<template>
  <div class="app-container" :style="setBgColor(albumpic_big)">
    <el-tabs v-model="editableTabsValue" type="border-card" @tab-remove="removeTab" @tab-click="changeTab(editableTabsValue)">
      <!-- 报告预览 -->
      <el-tab-pane type="border-card" label="检查列表" name="defaultTab">
        <div class="container-parent1" style="background: #e2eefc;">
          <div class="equipment">
            <div class="form">
              <el-form
                ref="searchForm"
                :model="searchForm"
                size="mini"
                style="display: flex; justify-content: center; /* 水平居中 */"
                class="searchForm">
                <div class="item-group">
                  <!-- 患者编号 -->

                  <el-form-item label-width="80px">
                    <div slot="label" class="item-title">
                      <!-- <el-checkbox
                    v-model="checkMap. "
                    style="margin-right: 4px"
                  /> -->
                      <el-checkbox label="">患者ID</el-checkbox>
                    </div>
                    <el-input
                      v-model="searchForm.ptdtPatientId"
                      style="width: 100px"
                      oninput="if(value>100000000000000)value=100000000000000;if(value.length>20)value=value.slice(0,20);if(value<0)value==0"
                      onkeyup="this.value=this.value.replace(/\D/g,'')"
                      :disabled="!checkMap.ptdtPatientId"
                      clearable />
                  </el-form-item>

                  <!-- 姓名 -->
                  <el-form-item label-width="80px">
                    <div slot="label" class="item-title">
                      <!-- <el-checkbox
                    v-model="checkMap.ptName"
                    style="margin-right: 4px"
                  /> -->
                      <el-checkbox label="">姓{{ '\u2003' }}名</el-checkbox>
                    </div>
                    <el-input
                      v-model="searchForm.ptName"
                      style="width: 100px"
                      :disabled="!checkMap.ptName"
                      clearable />
                  </el-form-item>

                  <!-- 检查号 -->
                  <el-form-item label-width="80px">
                    <div slot="label" class="item-title">
                      <!-- <el-checkbox
                    v-model="checkMap.ptdtCheckCode"
                    style="margin-right: 4px"
                  /> -->

                      <el-checkbox label="">检查号</el-checkbox>
                    </div>
                    <el-input
                      v-model="searchForm.ptdtCheckCode"
                      style="width: 100px"
                      :disabled="!checkMap.ptdtCheckCode"
                      clearable />
                  </el-form-item>
                </div>

                <!-- 天数选择 -->
                <div class="item-group r">
                  <el-radio-group v-model="searchForm.changeTime">
                    <el-radio label="1">今天</el-radio>
                    <el-radio label="2">昨天</el-radio>
                    <el-radio label="3">最近三天</el-radio>
                    <el-radio label="4">最近四天</el-radio>

                  </el-radio-group>
                </div>
                <!-- 检查日期 -->
                <div class="item-group J">
                  <div class="block">
                    <el-select v-model="value" placeholder="报告日期" class="backgroundcolor">
                      <el-option
                        label="检查日期"
                        value="report_date" />
                      <!-- <el-option v-for="item in TimeOptions"
                                 :key="item"
                                 :label="item"
                                 :value="item" /> -->
                    </el-select>
                    <el-date-picker
                      v-model="searchForm.startTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      prefix-icon="el-icon-arrow-down" />
                  </div>
                  <div class="block">
                    <el-date-picker
                      v-model="searchForm.endTime"
                      type="date"
                      placeholder="选择日期"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      prefix-icon="el-icon-arrow-down" />
                  </div>
                </div>
                <!-- 设备列表 -->
                <div class="item-group six" style="margin-right: 70px;">
                  <el-select
                            v-model="searchForm.equipment"
                            class="no-inherit"
                            clearable
                            placeholder="请选择检查设备类型"
                            @change="changeEquipmen"
                            style="width: 180px; margin-top: 9px"
                          >
                            <el-option v-for="item in equipmentList" :key="item.equipmentName" :label="item.equipmentName" :value="item.equipmentName" />
                  </el-select>
                  <!-- <el-radio-group v-model="searchForm.equipment" @change="changeEquipmen">
                    <el-radio
                      v-for="item in equipmentList"
                      :key="item.equipmentName"
                      :label="item.equipmentName">
                      {{ item.equipmentName }}
                    </el-radio>
                  </el-radio-group> -->

                </div>
                <!-- 检查报告 -->
                <div class="item-group g2">
                  <!-- <el-form-item label="我的报告" label-width="80px">
                <el-select
                  v-model="searchForm.myReport"
                  clearable
                  placeholder=""
                >
                  <el-option
                    v-for="(item, index) in completeStatusData"
                    :key="index"
                    :label="item.status"
                    :value="item.status"
                  />
                </el-select>
              </el-form-item> -->
                  <el-form-item label="检查项目" label-width="80px">
                    <el-select
                      v-model="searchForm.checkItem"
                      clearable
                      placeholder="">
                      <el-option
                        v-for="(item, index) in downCheckData"
                        :key="index"
                        :label="item"
                        :value="item" />
                    </el-select>
                  </el-form-item>
                  <el-form-item label="检查状态" label-width="80px">
                    <el-select
                      v-model="searchForm.checkState"
                      clearable
                      placeholder="">
                      <el-option
                        v-for="(item, index) in dropDownStateData"
                        :key="index"
                        :label="item.statuscn"
                        :value="item.statuscn" />
                    </el-select>
                  </el-form-item>
                </div>
                <!-- 高级查询 -->
                <div class="item-group">
                  <el-button @click="showAdvancedDialog = true" class="custom-button">高级查询</el-button>
                  <el-button @click="empty" class="custom-button">清空条件</el-button>
                  <el-button @click="doSearch" class="custom-button">搜索</el-button>
                </div>
                <!-- 高级查询 -->
                <el-dialog
                  class="advanced-search-dialog"
                  :visible.sync="showAdvancedDialog"
                  title="高级查询"
                  align-center
                  :width="800">
                  <el-form class="advanced-search-form" label-width="120px">
                    <el-form-item label="内容搜索">
                      <el-input
                        v-model="searchForm.searchQuery"
                        placeholder="请输入搜索关键字"
                        prefix-icon="el-icon-search" />
                    </el-form-item>
                    <el-form-item>
                      <el-card class="box-card">
                        <template #header>
                          <div class="card-header">
                            <span>内容包含在:</span>
                          </div>
                        </template>
                        <div>
                          <span>病史 -</span>
                          <span>检查所见 -</span>
                          <span>检查意见</span>
                        </div>
                      </el-card>
                    </el-form-item>
                    <el-form-item label="指定报告时间">
                      <el-date-picker
                        v-model="searchForm.startTime"
                        type="datetime"
                        placeholder="开始时间"
                        value-format="yyyy-MM-dd HH:mm:ss"
                        default-time="00:00:00" />
                      至
                      <el-date-picker
                        v-model="searchForm.endTime"
                        type="datetime"
                        placeholder="结束时间"
                        value-format="yyyy-MM-dd HH:mm:ss"
                        default-time="00:00:00" />
                    </el-form-item>
                    <el-form-item label="检查设备类型">
                      <el-select
                        v-model="selectedMachine"
                        clearable
                        placeholder="请选择检查设备类型"
                        @change="changeUnitType">
                        <el-option v-for="item in unitTypeList" :key="item" :label="item" :value="item" />
                      </el-select>
                    </el-form-item>
                    <el-form-item class="form-buttons">
                      <el-button @click="showAdvancedDialog = false">关闭</el-button>
                      <el-button type="primary" icon="el-icon-search" @click="doSearch">查询</el-button>
                    </el-form-item>
                  </el-form>
                </el-dialog>
                <!-- 高级查询结束 -->
                <el-dialog
                      title="问诊"
                      :visible.sync="showWZDialog"
                      width="35%"
                    >
                    <div class="dagInput">
                    <div class="interInput">
                      <h2 class="section-title">临床病史</h2>
                      <el-input
                        v-model="ptdtBgproreadyTxt"
                        class="input-field"
                        placeholder="临床病史"
                        clearable
                        type="textarea"
                        :rows="4"
                      />
                    </div>
                    <div class="interInput">
                      <h2 class="section-title">临床诊断</h2>
                      <el-input
                        v-model="ptdtLcdiagnousTxt"
                        class="input-field"
                        placeholder="临床诊断"
                        clearable
                        type="textarea"
                        :rows="4"
                      />
                    </div>

                  </div>

                      <span slot="footer" class="dialog-footer">
                        <el-button @click="showWZDialog = false" style="padding: 7px;">取 消</el-button>
                        <el-button type="primary" @click="handleConsultation" style="padding: 6px;">确 定</el-button>
                      </span>
                    </el-dialog>
                    <!-- 问诊弹窗结束 -->
              </el-form>
            </div>
          </div>
          <div class="pagination" style="display: flex; justify-content: center; margin: 8px 0px 8px 0px !important; height: 45px !important;">
                <div class="pagination-info" style="margin-top: 13px !important; margin-right: 6px">
                  数据总量: {{ total }} 条
                </div>
                <select v-model="pageNum" @change="changePages(pageNum)" style="height: 30px; margin-top: 7px; margin-right: 6px">
                  <option v-for="page in totalPages" :key="page" :value="page">
                    第 {{ page }} 页
                  </option>
                </select>
              <el-pagination
                  class="no-inherit"
                  background
                  :pager-count="5"
                  layout="prev, next"
                  :total="total"
                  :prev-text="prevText"
                  :next-text="nextText"
                  :current-page="pageNum"
                  @prev-click="prevPage"
                  @next-click="nextPage"
                  style="margin-top: 8px; margin-right: 6px"
                />
              <el-button
                  type="primary"
                  :disabled="!hasSelected"
                  @click="showWZDialog = true"
                  class="custom-button"
                >
                  问诊
                </el-button>
          </div>
          <!-- 搜索表单 -->

          <!-- 数据列表 -->
          <div class="table">
            <el-table
              ref="reportList"
              v-loading="listLoading"
              height="300"
              element-loading-text="加载中..."
              @selection-change="handleSelectionChange1"
              empty-text="暂无数据"
              :data="reportList"
              row-key="id"
              highlight-current-row
              class="reportList  container-parent-top"
              :highlight-selection-row="true"
              border>
              <el-table-column type="selection" width="55" />
              <el-table-column type="index" :index="indexMethod" width="55" />

              <el-table-column
                prop="status"
                label="报告状态"
                width="120"
                align="left">
                <template slot-scope="scope">
                  <i :class="scope.row.itemicon" />
                  <el-tag :type="scope.row.color" disable-transitions>{{
                    scope.row.statusName
                  }}</el-tag>
                </template>
              </el-table-column>
              <!-- <el-table-column prop="ptdtBranch" label="申请院区" width="120" align="left" /> -->
              <el-table-column prop="ptName" label="姓名" width="140" align="left" />
              <el-table-column prop="ptSex" label="性别" width="60" align="left" />
              <el-table-column prop="ptdeId" label="住院号" width="120" align="left" />
              <el-table-column prop="ptdtStatus" label="上传状态" width="120" align="left" />
              <el-table-column prop="" label="年龄" width="50" align="left" />
              <el-table-column
                prop="ptdtCheckCode"
                label="检查号"
                width="120"
                align="left" />
              <el-table-column
                prop="ptdtCheckName"
                label="检查项目"
                width="330"
                align="left" />
              <el-table-column prop="ptdtBgDoctor" label="报告医生" width="120" align="left" />
              <el-table-column prop="ptdtShDoctor" label="审核医生" width="120" align="left" />
              <el-table-column prop="ptdtShDoctor2" label="复审医生" width="120" align="left" />
              <el-table-column
                prop="ptdtCheckMachine"
                label="检查类型"
                width="150"
                align="left" />
              <el-table-column prop="ptdtReportDate" label="报告日期" width="330" align="left" />
              <el-table-column
                prop="ptdtPatientId"
                label="患者ID"
                width="90"
                align="left" />
              <el-table-column prop="ptTele" label="电话" width="180" align="left" />

              <el-table-column align="center" prop="ctrl" width="200" label="操作">
                <template slot-scope="scope">
                  <div class="box">
                    <div class="overview" @click="overview(scope.row)">浏览</div>
                    <el-button style="text-decoration: underline;" class="edit-btn" @click="addTab(scope.row); cns">编辑</el-button>
                    <div class="contrast" @click="contrast(scope.row)">对比报告</div>
                  </div>
                </template>
              </el-table-column>
            </el-table>
          </div>

          <div class="resize1" title="上下伸缩">
            ^
          </div>

          <!-- 病史检查部分 -->
          <div class="Imageprocessing container-parent-bottom">
            <div :data="tableList2"
            class="history-left container-leftt" style="width: 250px; background-color: #fff; height: 351px; margin: 2px; overflow-y: scroll; overflow-x: scroll">
              <el-tree
                      :data="treeData1"
                      :props="defaultProps1"
                      @node-click="handleNodeClick3"
                    />
                    <el-dialog
                      title="图片展示"
                      :visible.sync="dialogVisible_CheckList"
                      width="30%">
                      <div v-if="imageBase64">
                        <!-- 如果有 Base64 图片数据，展示图片 -->
                        <img :src="imageBase64" alt="图片" style="width: 100%;">
                      </div>
                      <div v-else>
                        <!-- 如果没有图片数据，展示提示信息 -->
                        <p style="text-align: center; color: red;">
                          图片数据为空，请稍后重试。
                        </p>
                      </div>
                      <span slot="footer" class="dialog-footer">
                        <el-button @click="dialogVisible_CheckList = false">关闭</el-button>
                      </span>
                    </el-dialog>
            </div>
            <div class="resize2" title="左右伸缩">
              ⋮
            </div>
            <div class="history-right cotainer-rightt">
              <div class="history-right-top" style="display: flex;">
                <div class="left-top">
                  <div class="left-top-top">
                    <span>病史</span>
                  </div>
                  <div v-for="(item, index) in bgReadyTxt"
                       :key="index"
                       class="left-top-bottom">时间：{{ item.ptdtCheckDate || '无' }}
                    <br>
                    {{ item.ptdtBgreadyTxt || '无' }}
                  </div>
                </div>
                <div class="left-top">
                  <el-descriptions title="随访结果" style="background-color: #c7d1dd; height: 25px;" />
                    <div style="margin-top: 1px; ">
                      <div style="display: flex; width: 536px; height: 20px;justify-content: space-between;">
                        <el-radio-group v-model="interview1" >
                        <el-radio label="未随访">未随访</el-radio>
                        <el-radio label="无进一步治疗">无进一步治疗</el-radio>
                        <el-radio label="符合">符合</el-radio>
                        <el-radio label="需再次随访">需再次随访</el-radio>
                        <el-radio label="不符合">不符合</el-radio>

                      </el-radio-group>
                      <el-button type="primary" @click="saveRecord" style="margin-left: 10px;">保存</el-button>
                      </div>
                      <el-input type="textarea" placeholder="请输入随访记录" :rows="6" v-model="ptdtShsjTxt" style="display: block"/>
                    </div>
                </div>

              </div>
              <div class="history-right-bottom">
                <div class="bottom-left">
                  <div class="bottom-left-top">
                    <span>检查所见</span>
                  </div>
                  <div v-for="(item, index) in checkSee"
                       :key="index"
                       class="bottom-left-bottom">
                    时间：{{ item.ptdtCheckDate }}
                    <br>
                    {{ item.ptdtCheckSjTxt || '无' }}
                  </div>
                </div>
                <div class="bottom-right">
                  <div class="right-top-top">
                    <span>检查意见</span>
                  </div>
                  <div v-for="(item, index) in checkOpinion"
                       :key="index"
                       class="right-bottom-bottom">
                    时间：{{ item.ptdtCheckDate || '无' }}
                    <br>
                    {{ item.ptdtCheckyjTxt || '无' }}
                  </div>
                </div>
              </div>
            </div>
            <div />
          </div>
        </div>
      </el-tab-pane>
      <!-- 编辑 -->
      <el-tab-pane
        v-for="tab in editableTabs"
        :key="tab.name"
        v-loading="loading"
        :label="tab.content"
        :name="tab.name"
        closable
        style="background-color: #e3eefd;"
        custom-class="custom-dialog"
        :show-cancel-button="false"
        :show-confirm-button="false">
        <div title="编  辑" style="background-color: #e3eefd;height: 855px;" class="edit">
          <div class="container-parent">
            <!-- 左半部分 -->
            <div class="container-parent-left" >
              <!-- 信息 -->
              <div style="height: 142.5px; margin-left: 12px;margin-top: 5px" >
                <!-- 1 -->
                <div style="height: 28.5px;width: 100%;">
                  <div style="width: 220px;height: 28px;float: left;border:0.01px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 48px;padding: 5px 0;">姓名</p>
                    <input v-model="report.ptName" type="test" style="width: 127px;height: 100%;padding: 0px;float: left;border: none;">
                  </div>
                  <div style="width: 220px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;padding: 5px 0;">性别</p>
                    <input v-model="report.ptSex" style="height: 100%;float: left;width: 25px;text-align: left;border: none;"></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;padding: 5px 0;">年龄</p>
                    <input v-model="report.ptdtAge" style="height: 100%;float: left;background-color: white;width: 31px;text-align: left;border: none;"></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;padding: 5px 0;">岁</p>
                  </div>
                  <div style="width: 220px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 32px;margin-left:10px;padding:5px 0;">身高</p>
                    <input v-model="report.ptdtHeight" style="height: 100%;float: left;background-color: white;width: 45px;text-align: left;margin: 0 10px;border: none;"></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;margin: 0 5px;padding: 5px 0;">cm</p>
                  </div>
                  <div style="width: 280px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;margin-left:10px;padding: 5px 0;">体重</p>
                    <input v-model="report.ptdtWeight" style="height: 100%;float: left;background-color: white;width: 38px;text-align: left;border:none"></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;margin: 0 15px;padding: 5px 0;">kg</p>
                  </div>
                  <!-- <div style="width: 175px;height: 100%;float: left;border:0.1px solid #69696a;">
                  <p style="height: 100%;float: left;background-color: #e3eefd;width: 72px;">联系电话</p>
                  <p style="height: 100%;float: left;background-color: white;width: 99px;text-align: left;">123******</p>
                </div> -->
                </div>
                <!-- 2 -->
                <div style="height: 28.5px;width: 100%;float: left;">
                  <div style="width: 220px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 72px;padding: 5px 0;">检查类型</p>
                    <input v-model="report.ptdtCheckMachine" style="height: 100%;background-color: white;width: 102px;text-align: left;border: none;float: left;"></input>
                  </div>
                  <div style="width: 443px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 48px;padding: 5px 0;">显像剂</p>
                    <el-select v-model="report.ptdtXxjTxt" clearable style="height: 100%;float: left;width: 103px;text-align: left;border: none;" @change="changeCheckXxj">
                      <el-option v-for="item in checkXxjList" :key="item" :label="item" :value="item" />
                    </el-select>
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 43px;padding: 5px 0;margin-left: 25px">剂量</p>
                    <input v-model="report.ptdtDosage" style="height: 100%;float: left;background-color: white;width: 31px;text-align: left;border: none;"></input>
                    <p style="height: 100%;float: left;background-color: #e3eefd;padding: 5px 0;">ml</p>
                  </div>
                  <div style="width: 280px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <div style="display: flex; align-items: center;height: 100%;">
                      <p style="height: 23.5px;float: left;background-color: #e3eefd;width: 78px;padding-top: 5px;">检查设备</p>
                      <el-select v-model="report.ptdtModelName" clearable placeholder="请选择检查设备" style="height: 100%;width: 240px;text-align: left;" @change="changeCheckMachine">
                        <el-option v-for="item in checkMachineList" :key="item" :label="item" :value="item" />
                      </el-select>
                    </div>
                  </div>
                </div>
                <!-- 3 -->
                <div style="height: 28.5px;width: 100%;float: left;">
                  <div style="width: 440px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 48px;padding: 5px 0;">检查号</p>
                    <input v-model="report.ptdtCheckCode" style="height: 100%;background-color: white;width: 303px;text-align: left;border: none;float: left;"></input>
                  </div>
                  <div style="width: 505px;height: 100%;float: left;border:0.1px solid #69696a;">
                    <div style="display: flex; align-items: center;">
                      <p style="height: 100%;float: left;background-color: #e3eefd;width: 72px;padding: 5px 0;">检查项目</p>
                      <el-select id="checkxm" v-model="report.ptdtCheckName" size="mini" clearable placeholder="请选择检查项目" style="height: 100%;float: left;width: 280px;text-align: left;border: none;">
                        <el-option v-for="(checkNameItem, checkNameIndex) in checkNameList" :key="checkNameIndex" :label="checkNameItem" :value="checkNameItem" />
                      </el-select>
                    </div>
                  </div>
                </div>
                <!-- 4 -->
                <div style="height: 28.5px;width: 100%;float: left;">
                  <div style="width: 947px;height: 100%;border:0.1px solid #69696a;">
                    <p style="height: 100%;float: left;background-color: #e3eefd;width: 72px;padding:5px 0;">临床诊断</p>
                    <input v-model="report.ptdtLcdiagnousTxt" style="height: 100%;float: left;background-color: white;width: 630px;text-align: left;border: none;"></input>
                  </div>
                </div>
                <!-- 5 -->
                <div style="height: 28.5px;width: 100%;float: left;">
                  <div style="width: 947px;height: 100%;border:0.1px solid #69696a;">
                    <p style="height: 23.5px;float: left;background-color: #e3eefd;width: 60px;margin-left:3px;padding-top: 5px;">阴阳性</p>
                    <el-radio v-model="report.ptdtPositiveflag" :label="null" style="float: left;margin-top: 3px;">不确定</el-radio>
                    <el-radio v-model="report.ptdtPositiveflag" label="0" style="float: left;margin-top: 3px;">阴性</el-radio>
                    <el-radio v-model="report.ptdtPositiveflag" label="1" style="float: left;margin-top: 3px;">阳性</el-radio>
                    <p style="height: 23.5px;float: left;background-color: #e3eefd;width: 40px;margin-left:30px;padding-top: 5px;">血糖</p>
                    <input v-model="report.ptdtBloodglucose" style="height: 100%;float: left;background-color: white;width: 31px;text-align: left;border: none;"></input>
                    <p style="height: 23.5px;float: left;background-color: #e3eefd;padding-top: 5px;">mmol/L</p>
                    <div style="height: 100%;float: left;background-color: #e3eefd;margin-left: 30px;">
                      <!-- onmouseover="document.getElementById('otherlist1').style.display='block'" -->
                      <!-- <el-dropdown>
                          <span class="el-dropdown-link">
                            其他<i class="el-icon-arrow-down el-icon--right" />
                          </span>
                          <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item>改变检查状态</el-dropdown-item>
                            <el-dropdown-item>修改报告医生</el-dropdown-item>
                            <el-dropdown-item>修改报告医生</el-dropdown-item>
                            <el-dropdown-item>修改报告医生</el-dropdown-item>
                          </el-dropdown-menu>
                        </el-dropdown> -->
                    </div>
                    <p style="height: 100%;float: left;background-color: #e3eefd;margin-left: 30px;color: #808000;">
                      <el-select
                        v-model="qtptdtBranch"
                        clearable
                        style="height: 100%;float: left;width: 100px;text-align: left;border: none;"
                        @change="changeqtptdtBranch;changeBranch()">
                        <el-option v-for="item in checkBranchList" :key="item" :label="item" :value="item" />
                      </el-select>
                    </p>
                  </div>
                </div>
              </div>

              <!-- table -->
              <div style="height: 40px;border-top: 0.1px solid #d0def1;margin-top: 3px">
                <div style="height: 40px;float: left;">
                  <el-button
                    v-show="shouldShowDemo1"
                    v-hasPermi="['system:check:reportExtract']"
                    :disabled="!shouldDisabled1"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reportExtract(report.ptdeId)">报告提取
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo2"
                    v-hasPermi="['system:check:revokeExtraction']"
                    :disabled="!shouldDisabled2"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revokeExtraction(report.ptdeId)">撤销提取
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo4"
                    v-hasPermi="['system:check:submitExamine']"
                    :disabled="!shouldDisabled3"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="submitExamine(report.ptdeId)">提交审核
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo5"
                    v-hasPermi="['system:check:reviewExtract']"
                    :disabled="!shouldDisabled4"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reviewExtract(report.ptdeId)">审核提取
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo6"
                    v-hasPermi="['system:check:revokeReview']"
                    :disabled="!shouldDisabled5"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revokeReview(report.ptdeId)">撤销审核
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo7"
                    v-hasPermi="['system:check:reviewApprove']"
                    :disabled="!shouldDisabled6"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reviewApprove(report.ptdeId)">审核通过
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo8"
                    v-hasPermi="['system:check:submitReexamine']"
                    :disabled="!shouldDisabled7"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="submitReexamine(report.ptdeId)">提交复审
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo9"
                    v-hasPermi="['system:check:reexamineExtract']"
                    :disabled="!shouldDisabled8"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reexamineExtract(report.ptdeId)">复审提取
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo10"
                    v-hasPermi="['system:check:revokeReexamine']"
                    :disabled="!shouldDisabled9"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revokeReexamine(report.ptdeId)">撤销复审
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo11"
                    v-hasPermi="['system:check:reexamineApprove']"
                    :disabled="!shouldDisabled10"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="reexamineApprove(report.ptdeId)">复审通过
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo3"
                    v-hasPermi="['system:check:revoke']"
                    :disabled="!shouldDisabled11"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revoke(backnumber)">撤回
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo30"
                    v-hasPermi="['system:check:revoke']"
                    :disabled="!shouldDisabled12"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;"
                    @click="revokeDoctor()">退回
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo12"
                    v-hasPermi="['system:check:changeReviewer1']"
                    :disabled="!shouldDisabled13"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;">
                    <el-dropdown trigger="click" :disabled="!shouldDisabled13">
                      <span class="el-dropdown-link">
                        转审<i class="el-icon-arrow-down el-icon--right" />
                      </span>
                      <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item
                          v-for="item in ptdtShDoctorList"
                          :key="item"
                          @click.native="changeReviewer1(item)">
                          {{ item }}
                        </el-dropdown-item>

                      </el-dropdown-menu>
                    </el-dropdown>
                  </el-button>
                  <el-button
                    v-show="shouldShowDemo13"
                    v-hasPermi="['system:check:changeReviewer2']"
                    :disabled="!shouldDisabled14"
                    style="width: 64px;height: 100%;margin-right: 2px;padding: 0 3px;border: none;">
                    <el-dropdown trigger="click" :disabled="!shouldDisabled14">
                      <span class="el-dropdown-link">
                        转审<i class="el-icon-arrow-down el-icon--right" />
                      </span>
                      <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item
                          v-for="item in ptdtFsDoctorList"
                          :key="item"
                          @click.native="changeReviewer2(item)">
                          {{ item }}
                        </el-dropdown-item>

                      </el-dropdown-menu>
                    </el-dropdown>
                  </el-button>

                </div>
                <div style="height: 40px;width: 362px;float: right;">
                  <el-button
                    style="width: 58px;height: 100%;margin-right: 2px;border: none;float: left;"
                    @click="submitReport()">保存

                  </el-button>
                  <div style="width: 236px;;height: 100%;float: left;">
                    <el-card class="box-card" style="width: 236px;;height: 100%;overflow-y: scroll;background-color: #b5ffe1;">
                      <div v-for="(item,index) in DoctorAndTime" :key="index" class="text item" style="padding: 0;">
                        {{ DoctorAndTime[index].status +DoctorAndTime[index].doctor +DoctorAndTime[index].time }}
                      </div>
                    </el-card>
                  </div>
                  <div
                    style="width: 40px;height:20px;background-color: yellow;color: black;border: none;float: left;padding:10px;font-size:smaller">
                    {{ checkingStatusItems[0].statuscn }}
                  </div>

                </div>
              </div>

              <!-- content -->
              <div style="width: 100%;height: 618px;margin-top: 1px;">
                <div style="width: 1075px;height: 23px;">

                <!-- <quill-editor
                    ref="myQuillEditor"
                    v-model="content"
                    class="ql-editor"
                    :options="editorOption"
                    @blur="onEditorBlur($event)"
                    @focus="onEditorFocus($event)"
                    @change="onEditorChange($event)" /> -->
                <!-- <p>123</p> -->
                </div>

                <div style="width: 100%;height: 595px;">
                  <div style="width: 1075px;height: 23px;border: 1px solid #d5e2f4;"><strong><p style="margin-left: 10px;">[病史]</p></strong></div>
                  <!-- <el-input
                    id="quill"
                    v-model="report.jcProReadyTxt"
                    :rows="6"
                    style="margin-top: 2px;"
                    type="textarea"
                    placeholder="请输入内容"
                    @input="updateEditorContent" /> -->
                  <quill-editor
                    v-model="report.jcProReadyTxt"
                    class="ql-editor"
                    style="resize: vertical;height: 25%;background-color: white;"
                    :options="editorOption"
                    @blur="onEditorBlur($event)"
                    @focus="onEditorFocus($event)"
                    @change="onEditorChange($event)" />
                  <div style="width: 1075px;height: 23px;border: 1px solid #d5e2f4;"><strong><p style="margin-left: 10px;">[检查所见]</p></strong></div>
                  <!-- <el-input
                    v-model="report.jcSjTxt"
                    :rows="8"
                    :readonly="btnStatus == 0 ? false : true"
                    style="margin-top: 2px;"
                    type="textarea"
                    placeholder="请输入内容" /> -->
                  <quill-editor
                    v-model="report.jcSjTxt"
                    class="ql-editor"
                    style="resize: vertical;height: 33%;background-color: white;"
                    :options="editorOption"
                    @blur="onEditorBlur($event)"
                    @focus="onEditorFocus($event)"
                    @change="onEditorChange($event)" />
                  <div style="width: 1075px;height: 23px;border: 1px solid #d5e2f4;"><strong><p style="margin-left: 10px;">[检查意见]</p></strong></div>
                  <!-- <el-input
                    v-model="report.jcYjTxt"
                    :readonly="btnStatus == 0 ? false : true"
                    :rows="11"
                    style="margin-top: 2px;"
                    type="textarea"
                    placeholder="请输入内容" /> -->
                  <quill-editor
                    v-model="report.jcYjTxt"
                    class="ql-editor"
                    style="resize: vertical;height: 38%;background-color: white;"
                    :options="editorOption"
                    @blur="onEditorBlur($event)"
                    @focus="onEditorFocus($event)"
                    @change="onEditorChange($event)" />
                </div>
              </div>
            </div>

            <div class="resize" title="收缩侧边栏">
              ⋮
            </div>

            <!-- 右半部分 -->
            <div class="container-parent-right">
              <el-tabs v-model="activeName2" type="border-card" style="background-color: #e3eefd;padding: 0;margin: 0;" @tab-click="handleNodeClick2">
                <!-- 历史 -->
                <el-tab-pane label="历史" name="first">
                  <div style="height: 174px;width: 100%;border:0.1px solid #c4d9f3;">

                    <div style="height: 28px;width: 100%;display: flex;justify-content: space-around;">
                      <!-- <input type="text" style="float: left;margin: 3px 6px;border-radius: 2px;border: 0.1px solid; width: 87px;height: 21px;padding-left: 3px;"> -->

                      <!-- <el-dropdown style="float: left;margin: 3px 6px;border-radius: 2px;border: 0.1px solid; width: 85px;height: 21px;padding-left: 3px;background-color: white;">
                          <el-button style="border: none;float: right;">
                            <i class="el-icon-arrow-down el-icon--right" />
                          </el-button>
                          <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item>姓名</el-dropdown-item>
                            <el-dropdown-item>检查号</el-dropdown-item>
                          </el-dropdown-menu>
                        </el-dropdown> -->

                      <el-select
                        id="el-input__inner1"
                        v-model="cxvalue"
                        class="el-input__inner"
                        style="float: left;margin: 3px 0;border-radius: 2px; width: 85px;height: 21px;"
                        @change="changecxvalue">
                        <el-option
                          v-for="item in cxoptions"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                          style="margin-top:4px" />
                      </el-select>
                      <!-- <el-select id="el-input__inner1" v-model="region1" style="float: left;margin: 3px 6px;border-radius: 2px;border: 0.1px solid; width: 85px;height: 21px;background-color: white;">
                          <el-option label="姓名" />
                          <el-option label="检查号" />
                        </el-select> -->

                      <input
                        v-model="hisSearchvalue"
                        type="text"
                        style="float: right;margin: 3px 1%;border-radius: 2px;border: 0.1px solid; width: 70%;height: 21px;padding-left: 3px;">
                      <el-button
                        style="width: 58px;height: 27px;border-radius: 2px;border: 0.1px solid;text-align: center;background-color: #c3d6ed;float: right;"
                        @click="hisDoSearch(cxvalue, hisSearchvalue)">查询
                      </el-button>

                    </div>

                    <div style="height: 24px;width: 100%;display: flex;justify-content: space-between;">
                      <span style="float: left;font-size: small;margin-top: 5px;">既往检查：{{ jwchecked }}</span>
                      <span style="float: right;">
                        <el-checkbox
                          v-model="jlchecked"
                          style="color:black;"
                          @change="jlcheck(jlchecked, hisSearchList)">仅列出与当前检查类型的历史记录</el-checkbox>
                      </span>
                    </div>
                    <!-- 表格1 -->
                    <div style="height: 121px;width: 100%;background-color: #f4f4f4;">
                      <el-table
                        :data="hisSearchList"
                        style="width: 100%;"
                        border
                        :row-key="getRowKey"
                        :height="121"
                        @selection-change="handleSelectionChange"
                        @row-click="handleRowClick">
                        <!-- @click.native="detailsClick(item.ptdeId)" -->
                        <!-- tableList.slice((pageNum - 1) * pageSize, pageNum * pageSize) -->
                        <el-table-column prop="ptName" label="姓名" min-width="80" />
                        <el-table-column prop="ptSex" label="性别" min-width="80" />
                        <el-table-column prop="ptdtCheckDate" label="检查日期" min-width="100" />
                        <el-table-column prop="ptdtCheckCode" label="检查号" min-width="90" />
                        <el-table-column prop="ptdtCheckName" label="检查项目" min-width="100" />
                        <el-table-column prop="ptBrithday" label="生日" min-width="80" />
                        <el-table-column prop="ptdtCheckMachine" label="检查设备" min-width="100" />
                        <el-table-column prop="ptdtStatus" label="状态" min-width="80" />
                        <el-table-column prop="ptdtBgDoctor" label="报告医生" min-width="100" />
                        <el-table-column prop="ptdtShDoctor" label="审核医生" min-width="100" />
                      </el-table>
                    </div>
                  </div>

                  <div style="height: 137px;;width: 100%;">
                    <!-- 按钮 -->
                    <div style="height: 24px;;width: 100%;margin-top: 2px;">
                      <el-button style="float: left;width: 83px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;">断层序列</el-button>
                      <el-button style="float: left;width: 65px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;" @click="open">融合</el-button>
                      <el-button style="float: left;width: 48px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;" @click="append">对比</el-button>
                      <div style="float: left;width: 72px;height: 24px;background-color: #d6e3f6;border: none;padding: 0 5px;padding-top: 1px;">
                        <el-checkbox v-model="pzchecked">配准</el-checkbox>
                      </div>
                    </div>
                    <!-- 表格二 -->
                    <div style="height: 121px;width: 100%;background-color: #f4f4f4;">
                      <el-table
                        ref="multipleTable"
                        v-horizontal-scroll="'always'"
                        :data="tableList3"
                        height="121"
                        row-key="id"
                        @selection-change="handleSelectionChange">
                        <el-table-column
                          type="selection"
                          width="55"
                          fixed="left"
                          :reserve-selection="true"
                          :selectable="checkSelectable" />
                        <el-table-column prop="seriesNumber" label="序列号" />
                        <el-table-column prop="modality" label="设备" />
                        <el-table-column prop="seriesDescription" label="序列描述" />
                        <el-table-column prop="seriesNumber" label="图像数" />
                        <el-table-column prop="bodyPartExamined" label="检查部位" min-width="200" />
                        <el-table-column prop="ptdtCheckCode" label="检查号1" min-width="150" />
                        <el-table-column prop="ptdtCheckCode" label="采集日期" min-width="150" />
                        <el-table-column prop="ptdtCheckCode" label="采集时间" min-width="150" />
                        <el-table-column prop="radionuclideTotalDose" label="剂量(mCi)" />
                        <el-table-column prop="manufacturer" label="设备厂商" min-width="70" />
                        <el-table-column prop="modelName" label="设备型号" min-width="90" />
                      </el-table>
                    </div>
                  </div>

                  <div style="width: 100%;height: 483px;margin-top: 7px;">

                    <div class="tabs1" style="height: 24px;;width: 100%;margin-top: 2px;margin-bottom: 2px;">
                      <button data-tab="baogao" class="sbutton1 active" style="float: left;width: 67px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;font-size: small;text-align: center;padding-top: 2px;color: black;" @click="openTab1('baogao')">报告内容</button>
                      <!-- <button data-tab="jietu" class="sbutton1" style="float: left;width: 40px;height: 24px;background-color: #a0bce0;border: 0.1px solid #b7cae3;color: #5d7faa;" @click="openTab1('jietu')">截图</button> -->
                      <!-- <button data-tab="jietu" class="sbutton1" style="float: left;width: 40px;height: 24px;background-color: #a0bce0;border: 0.1px solid #b7cae3;color: #5d7faa;">截图</button> -->
                    </div>

                    <div style="height: 459px;;width: 99.5%;border:0.1px solid #c3d5ec">
                      <!-- 报告内容 -->
                      <div id="baogao" class="tab1-content active">
                        <div style="width: 100%;height: 23px;border: 1px solid #d5e2f4;"><p style="margin-left: 10px;">[临床诊断]</p></div>
                        <el-input
                          id="quill"
                          v-model="HistoryVo2.ptdtLcdiagnousTxt"
                          :rows="1"
                          style="margin-top: 2px;"
                          type="textarea"
                          placeholder="请输入内容"
                          @input="updateEditorContent" />
                        <div style="width: 100%;height: 23px;border: 1px solid #d5e2f4;"><p style="margin-left: 10px;">[病史]</p></div>
                        <el-input
                          id="quill"
                          v-model="HistoryVo2.ptdtBgreadyTxt"
                          :rows="3"
                          style="margin-top: 2px;"
                          type="textarea"
                          placeholder="请输入内容"
                          @input="updateEditorContent" />
                        <div style="width: 100%;height: 23px;border: 1px solid #d5e2f4;"><p style="margin-left: 10px;">[检查所见]</p></div>
                        <el-input
                          v-model="HistoryVo2.ptdtChecksjTxt"
                          :rows="5"
                          style="margin-top: 2px;"
                          type="textarea"
                          placeholder="请输入内容" />
                        <div style="width: 100%;height: 23px;border: 1px solid #d5e2f4;"><p style="margin-left: 10px;">[检查意见]</p></div>
                        <el-input
                          v-model="HistoryVo2.ptdtCheckyjTxt"
                          :rows="6"
                          style="margin-top: 2px;"
                          type="textarea"
                          placeholder="请输入内容" />
                      </div>
                      <!-- 截图 -->
                      <div id="jietu" class="tab1-content" style="background-color: black;overflow-y: scroll;width: 100%;height: 100%;">
                        <el-image v-for="(hisurl,index) in hisurls" :key="index" :src="hisurls[index].path" :class="{ 'highlight': hisurl.selected }" :style="{width:elimg+'%'}" style="margin: 5px;" @click.native="toggleHighlight(index)" />
                      </div>

                    </div>

                  </div>
                </el-tab-pane>
                <!-- 图像 -->
                <el-tab-pane label="图像" name="second">
                  <!-- <div>
                      <div style="width:100%;height: 24px;margin-top: 2px;">
                        <el-button-group>
                          <el-button v-model="selectAll" style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;" @click="selectAll">全选</el-button>
                          <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;">刷新</el-button>
                          <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;">小图标</el-button>
                        </el-button-group>
                        <div style="float: right;">
                          <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;">删除</el-button>
                          <p style="float: left;margin: 3px;">0/4</p>
                        </div>
                      </div>
                      <div style="width: 100%;height: 805px;background-color: black;overflow-y: scroll;">
                        <div v-for="(url, index) in urls" :key="index" class="image-container">
                          <el-image :src="url" lazy style="width: 30%;margin: 5px;" />
                          <input v-model="urls[index].selected" type="checkbox" style="display: none;">
                        </div>
                      </div>
                    </div> -->

                  <div style="width:100%;height: 24px;margin-top: 2px;">
                    <el-button-group>
                      <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;" @click.native="selectAllimg()">全选</el-button>
                      <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;" @click.native="handleNodeClick2(e)">刷新</el-button>
                      <label for="fileInput" style="margin-left: 10px; display: inline-block; padding: 0 10px; border: 0.1px solid #b7cae3; height: 24px; line-height: 24px;">
                      <el-upload class="avatar-uploader"
                              action="/common/upload"
                              :show-file-list="false"
                              :on-success="handleAvatarSuccess"
                              :before-upload="beforeUpload"
                              ref="upload">
                          <img v-if="imageUrl" :src="imageUrl" class="avatar"></img>
                          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                      </el-upload>
                    </label>
                      <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;" @click.native="imgchange">{{ imgbs }}</el-button>
                      <el-button
                      style="float: left;width: 55px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;"
                      @click="printWord()"
                    >
                      打印截图
                    </el-button>
                    </el-button-group>
                    <div style="float: right;">
                      <el-button style="float: left;width: 47px;height: 24px;border: 0.1px solid #b7cae3;font-size: small;" @click.native="deleteimg()">删除</el-button>
                      <p style="float: left;margin: 3px;">{{ selectimgnumber }}/{{ allimgnumber }}</p>
                    </div>
                  </div>
                  <div style="width: 100%;height: 805px;background-color: black;overflow-y: scroll;">

                    <!-- <div v-for="(url, index) in urls" :key="index" class="image-container" @click="selectImage(index)">
                      <el-image :src="url.completePath" :class="{ 'highlight': url.selected }" lazy style="width: 30%;margin: 5px;" />
                      <input v-model="url.selected" type="checkbox" style="display: none;">
                    </div> -->

                    <div v-for="(item, index) in urls" :key="index" style="margin: 5px;">
                      <el-image
                        :src="item.path"
                        :class="{ 'highlight': item.selected }"
                        :style="{ width: elimg + '%' }"
                        lazy
                        @click.native="toggleHighlight(index)"
                      />
                      <div style="color: white;">
                        <strong>ID:</strong> {{ item.imageID }} <br />
                        <strong>描述:</strong> {{ item.imageDescription }} <br />
                        <el-button @click="openDescribe(item)">修改描述</el-button>
                      </div>
                    </div>

                      <el-dialog
                        title="修改描述"
                        :visible.sync="openDescribe1"
                        :close-on-click-modal="false"
                        :modal="true"
                        width="700px"
                        class="unique-dialog-style">

                        <div class="input-container">
                          <el-input
                            v-model="newDescription"
                            placeholder="输入新的描述"
                            class="resizable-input"
                            clearable
                            type="textarea"
                            rows="4">
                          </el-input>
                        </div>

                        <span slot="footer" class="unique-footer-style">
                          <el-button
                            @click="openDescribe1 = false"
                            class="unique-cancel-button">取 消</el-button>
                          <el-button
                            type="primary"
                            @click="updateDescription()"
                            class="unique-confirm-button">确 定</el-button>
                        </span>
                      </el-dialog>
                  <!-- <el-image v-for="(url,index) in urls" :key="index" :src="urls[index].completePath" :class="{ highlight: pindex ===activeindex }" :style="{width:elimg+'%'}" lazy style="margin: 5px;" @click.native="activeindex=index" /> -->
                  <!-- :class="{ selected1: url.number }" -->
                  </div>
                </el-tab-pane>
                <!-- 模板 -->
                <el-tab-pane label="模板" name="third">
                  <!-- class="tabs1" -->
                  <div style="margin-left: 5px;">
                    <!-- data-tab="moban" class="sbutton1 active"  -->
                    <div class="sbutton1 active" style="background-color: #ececec;color: black;text-align: center;border-radius: 1px;padding-top: 2px;">诊断模板</div>
                  </div>
                  <div style="border:0.1px solid #c4d9f3;height: 770px;margin:0 3px;">
                    <!-- id="moban" class="tab1-content active" -->
                    <div>

                      <div style="width: 100%;height: 244px;padding: 3px 2px;">

                        <div style="height: 24px;width: 100%;margin-bottom: 4px;">
                          <el-button style="width: 48px;height: 23px;float: left;margin-left: 2px;background-color: #bcd0e9;text-align: center;border-radius: 2px;font-size: small;padding-top: 2px;" @click="handleNodeClick2">刷新</el-button>
                          <el-button style="width: 48px;height: 23px;float: right;margin-left: 2px;background-color: #bcd0e9;text-align: center;border-radius: 2px;font-size: small;padding-top: 2px;" @click="dialogVisible = true">设置</el-button>
                          <!-- reload1 -->
                          <el-dialog
                            title="模板库设置-诊断模板"
                            :visible.sync="dialogVisible"
                            width="50%"
                            custom-class="custom-dialog"
                            top="15"
                            :before-close="handleClose">
                            <div style="display: block;height: 40px;margin-bottom: 10px;">
                              <!-- <el-button style="height: 40px;padding: 0 10px;float:left;" @click="() => mbappend(data2)">增加子项目</el-button>
                              <el-button style="height: 40px;padding: 0 10px;float:left;" @click="getCheckedNodes(data)">删除项目</el-button> -->
                              <!-- () => mbremove(node, data) -->
                              <el-button style="height: 40px;padding: 0 10px;float:right;" @click="dialogVisible = false">关闭</el-button>
                              <!-- <el-button style="height: 40px;padding: 0 10px;float:right;" @click="cns">关闭231</el-button> -->
                              <el-button style="height: 40px;padding: 0 10px;float:left;" @click="mbsave(TemplateInfo3.id,TemplateInfo3.label,TemplateInfo3.libCheckSj,TemplateInfo3.libCheckYj)">保存</el-button>
                            </div>

                            <div style="display: block;height: 500px;">
                              <div style="width: 48%;height: 100%;float: left;">
                                <div style="height: 7%;background-color: #e3eefd;padding: 8px 15px;">{{ TemplateInfo3.label }}</div>
                                <div style="width: 100%;height: 93%;background-color: white;margin: 0 2px;overflow-y: scroll;">
                                  <!-- <el-tree
                                    :data="data2"
                                    show-checkbox
                                    node-key="id"
                                    default-expand-all
                                    :expand-on-click-node="false"
                                    :props="defaultProps2"
                                    @node-click="getTemplateInfo3"
                                  /> -->
                                  <el-tree
                                    :data="data2"

                                    node-key="id"
                                    default-expand-all
                                    :expand-on-click-node="false"
                                    :props="defaultProps2"
                                    @node-click="getTemplateInfo3">
                                    <span slot-scope="{ node, data }" class="custom-tree-node">
                                      <span>{{ node.label }}</span>
                                      <span>
                                        <el-button type="text" size="mini" @click="() => mbappendbox(data)">
                                          <i class="el-icon-circle-plus" />
                                        <!-- <img src="@/assets/images/add-circle.png" alt="" style="height: 15px;padding-top: 3px;margin-left: 15px"> -->
                                        </el-button>
                                        <el-button type="text" size="mini" @click="() => mbremovebox(data)">
                                          <i class="el-icon-delete-solid" />
                                        <!-- <img src="@/assets/images/cancel-circle.png" alt="" style="height: 15px;padding-top: 3px;"> -->
                                        </el-button>
                                      </span>
                                    </span>
                                  </el-tree>
                                </div>
                              </div>
                              <div style="width: 50%;height: 100%;float: right;background-color: #e3eefd;padding: 5px;overflow:hidden;border-radius:1px blue solid;">
                                <el-form :inline="true" class="demo-form-inline" style="height:35px;">
                                  <div style="float:left;width:40%">
                                    <p style="font-size:small;float:left;padding: 10px 5px;">适用性别</p>
                                    <el-form-item style="width:50%;float:left">
                                      <el-select v-model="mbgender">
                                        <el-option label="男" value="shanghai" />
                                        <el-option label="女" value="beijing" />
                                      </el-select>
                                    </el-form-item>
                                  </div>
                                  <div style="float:left;width:60%">
                                    <p style="font-size:small;float:left;padding: 10px 5px;">标题</p>
                                    <el-form-item style="width:70%;float:left">
                                      <el-input v-model="TemplateInfo3.label" />
                                    </el-form-item>
                                  </div>
                                </el-form>
                                <p style="text-align: center;font-size: small;margin-bottom: 2px;margin-top:8px;">检查所见</p>
                                <el-input
                                  v-model="TemplateInfo3.libCheckSj"
                                  :rows="12"
                                  style="width: 100%;background-color: white;margin: 0 2px;"
                                  type="textarea" />
                                <p style="text-align: center;font-size: small;margin-bottom: 2px;margin-top:8px;">检查意见</p>
                                <el-input
                                  v-model="TemplateInfo3.libCheckYj"
                                  :rows="6"
                                  style="width: 100%;background-color: white;margin: 0 2px;"
                                  type="textarea" />
                                <!-- <div style="margin-top:12px;">
                                    <p style="text-align: center;font-size: small;margin-bottom: 2px;">检查所见</p>
                                    <div style="width: 426px;height: 279px;background-color: white;margin: 0 2px;" @click="getTemplateInfo2a">{{ TemplateInfo2.libCheckSj }}</div>
                                  </div>

                                  <div style="margin-top:12px;">
                                    <p style="text-align: center;font-size: small;margin-bottom: 2px;">检查意见</p>
                                    <div style="width: 426px;height: 148px;background-color: white;margin: 0 2px;" @click="getTemplateInfo2b">{{ TemplateInfo2.libCheckYj }}</div>
                                  </div> -->
                              </div>
                            </div>

                            <div style="display:none;">
                              <span>这是一段信息</span>
                              <span slot="footer" class="dialog-footer">
                                <el-button @click="dialogVisible = false">取 消</el-button>
                                <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
                              </span>
                            </div>
                          </el-dialog>
                        </div>

                        <div style="width: 100%;height: 217px;background-color: white;margin: 0 2px;overflow-y: scroll;">
                          <el-tree :data="data2" :props="defaultProps2" @node-click="getTemplateInfo2" />
                        </div>

                      </div>

                      <div style="">

                        <p style="text-align: center;font-size: small;margin-bottom: 2px;margin-top:12px;">检查所见</p>
                        <el-input
                          v-model="TemplateInfo2.libCheckSj"
                          :rows="12"
                          style="width: 100%;background-color: white;margin: 0 2px;"
                          type="textarea"
                          @click.native="getTemplateInfo2a" />
                        <p style="text-align: center;font-size: small;margin-bottom: 2px;margin-top:12px;">检查意见</p>
                        <el-input
                          v-model="TemplateInfo2.libCheckYj"
                          :rows="9"
                          style="width: 100%;background-color: white;margin: 0 2px;"
                          type="textarea"
                          @click.native="getTemplateInfo2b" />

                        <!-- <div style="margin-top:12px;">
                            <p style="text-align: center;font-size: small;margin-bottom: 2px;">检查所见</p>
                            <div style="width: 426px;height: 279px;background-color: white;margin: 0 2px;" @click="getTemplateInfo2a">{{ TemplateInfo2.libCheckSj }}</div>
                          </div>

                          <div style="margin-top:12px;">
                            <p style="text-align: center;font-size: small;margin-bottom: 2px;">检查意见</p>
                            <div style="width: 426px;height: 178px;background-color: white;margin: 0 2px;" @click="getTemplateInfo2b">{{ TemplateInfo2.libCheckYj }}</div>
                          </div> -->
                        </el-input>
                      </div>

                    </div>

                  </div>

                  <div style="height:20px;margin-left: 5px;margin-top: 5px;">
                  <!-- <button style="width: 10px;height: 10px;float: left;margin-top: 6px;" />
                  <p style="font-size: small;margin-top: 2px;margin-left: 4px;float: left;">默认展开所有节点</p>
                  <p style="font-size: small;margin-top: 2px;margin-left: 12px;float: left;">内容字体放大率%</p> -->
                  </div>
                </el-tab-pane>
                <!-- 序列 -->
                <el-tab-pane label="序列" name="fourth">
                  <div style="height: 100%;width: 100%;padding: 40px 0;">
                    <!-- 表格1 -->
                    <div style="height: 241px;width: 100%;background-color: #f4f4f4;">
                      <div style="height: 100%;width: 100%;background-color: #f4f4f4;">
                        <div>
                          <div style="width: 100%;height: 241px;background-color: white;">
                            <!-- <el-table
                          :data=""
                          v-horizontal-scroll="'always'"
                          height="241"
                          ref="multipleTable"
                          @selection-change="handleSelectChange"
                        >
                          <el-table-column
                            type="selection"
                            width="50"
                            :selectable="selectable"
                          />
                          <el-table-column
                            label="检查部位"
                            prop="bodyPartExamined"
                            fixed
                            align="center"
                            width="120"
                          ></el-table-column>
                          <el-table-column
                            label="设备商"
                            prop="manufacturer"
                            width="90"
                            align="center"
                          ></el-table-column>
                          <el-table-column prop="modality" label="设备"></el-table-column>
                          <el-table-column
                            prop="modelName"
                            label="设备型号"
                            show-overflow-tooltip
                            align="center"
                          ></el-table-column>
                          <el-table-column
                            prop="numFrames"
                            label="图像帧总数"
                            width="90"
                            align="center"
                          ></el-table-column>
                          <el-table-column
                            prop="numSerRelIma"
                            label="图象数"
                            width="80"
                            align="center"
                          ></el-table-column>
                          <el-table-column
                            prop="radionuclideStartTime"
                            label="注射时间"
                            align="center"
                            width="80"
                          ></el-table-column>
                          <el-table-column
                            prop="radionuclideTotalDose"
                            label="剂量"
                            align="center"
                            width="80"
                          ></el-table-column>
                          <el-table-column
                            prop="seriesDescription"
                            label="序列描述"
                            align="center"
                            width="100"
                            show-overflow-tooltip
                          ></el-table-column>
                          <el-table-column
                            prop="seriesNumber"
                            label="序列号"
                            align="center"
                            width="80"
                          ></el-table-column>
                          <el-table-column
                            width="100"
                            prop="seriesDate"
                            label="序列时间"
                            align="center"
                          ></el-table-column>
                            </el-table> -->
                            <el-table
                              ref="multipleTable"
                              v-horizontal-scroll="'always'"
                              :data="tableList"
                              style="width: 100%;"
                              :height="241"
                              @selection-change="handleSelectionChange">
                              <el-table-column prop="ptdtCheckCode" label="检查号" min-width="150" />
                              <el-table-column prop="seriesDescription" label="检查描述" min-width="150" />
                              <el-table-column prop="seriesDescription" label="姓名" min-width="100" />
                              <el-table-column prop="seriesDescription" label="年龄" />
                              <el-table-column prop="seriesDescription" label="检查日期" min-width="100" />
                              <el-table-column prop="seriesDescription" label="检查时间" min-width="100" />
                              <el-table-column prop="seriesDescription" label="检查类型" min-width="100" />
                            </el-table>
                          </div>
                        </div>
                      </div>
                    </div>

                    <div style="height: 24px;;width: 100%;margin-top: 2px;">
                      <el-button style="float: left;width: 83px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;">断层序列</el-button>
                      <el-button style="float: left;width: 65px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;" @click="open">融合</el-button>
                      <el-button style="float: left;width: 48px;height: 24px;background-color: #d6e3f6;border: 0.1px solid #b7cae3;margin: 0;" @click="append">对比</el-button>
                      <div style="float: left;width: 72px;height: 24px;background-color: #d6e3f6;border: none;padding: 0 5px;padding-top: 1px;">
                        <el-checkbox v-model="pzchecked">配准</el-checkbox>
                      </div>
                    </div>
                    <!-- 表格二 -->
                    <div style="height: 487px;width: 100%;background-color: #f4f4f4;">
                      <el-table
                        ref="multipleTable"
                        v-horizontal-scroll="'always'"
                        :data="tableList1"
                        height="487"
                        @selection-change="handleSelectionChange">
                        <el-table-column
                          type="selection"
                          width="50"
                          :selectable="selectable" />
                        <el-table-column
                          label="检查部位"
                          prop="bodyPartExamined"
                          fixed
                          align="center"
                          width="120" />
                        <el-table-column
                          label="设备商"
                          prop="manufacturer"
                          width="90"
                          align="center" />
                        <el-table-column prop="modality" label="设备" />
                        <el-table-column
                          prop="modelName"
                          label="设备型号"
                          show-overflow-tooltip
                          align="center" />
                        <el-table-column
                          prop="numFrames"
                          label="图像帧总数"
                          width="90"
                          align="center" />
                        <el-table-column
                          prop="numSerRelIma"
                          label="图象数"
                          width="80"
                          align="center" />
                        <el-table-column
                          prop="radionuclideStartTime"
                          label="注射时间"
                          align="center"
                          width="80" />
                        <el-table-column
                          prop="radionuclideTotalDose"
                          label="剂量"
                          align="center"
                          width="80" />
                        <el-table-column
                          prop="seriesDescription"
                          label="序列描述"
                          align="center"
                          width="100"
                          show-overflow-tooltip />
                        <el-table-column
                          prop="seriesNumber"
                          label="序列号"
                          align="center"
                          width="80" />
                        <el-table-column
                          width="100"
                          prop="seriesDate"
                          label="序列时间"
                          align="center" />
                      </el-table>
                    </div>

                  </div>
                </el-tab-pane>
                <el-tab-pane label="打印" name="fifth">
                  <div class="button-container">
                    <el-button
                      type="primary"
                      size="small"
                      @click="printTextTemp()"
                      class="action-button"
                      style="padding: 6px 12px; font-size: 14px;"
                    >
                      打印报告
                    </el-button>
                  </div>
                  <div class="content-container">
                  </div>
                </el-tab-pane>
              </el-tabs>
            </div>
          </div>
        </div></el-tab-pane></el-tabs></div>

</template>

<script>
import 'quill/dist/quill.bubble.css'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'

import {
getBgReadyTxt,
getCheckOpinion,
getCheckSee,
getCompleteStatus,
getDropDownCheckName,
getDropDownState,
getEquipment,
getSurvey,
patientInfoList
} from '@/api/report'
import { quillEditor } from 'vue-quill-editor'

import {
SendActions,
getImages,
getSaveEdit,
getSequence,
getUpdateEdit,
studentReportInfo,
templateData,
templateInfo
} from '@/api/report'
import axios from 'axios'
import dayjs from 'dayjs'
import { v4 as uuidv4 } from 'uuid'

import XTabs from '@/components/XTabs2.vue'

import teacher from '@/api/teacher'
export default {
  // name: 'Report',
  components: {
    XTabs,
    quillEditor
  },
  props: {
    totalPages: Number // 总页数
    // maxSize: Number // 每页最大显示数量
  },
  data() {
    return {
      tableList3: [],
      imageID_req: '',
      imageDescription_req: '',
      newDescription: '',
      ptdeId1: '',
      ptdtBgproreadyTxt: '',
      ptdtLcdiagnousTxt: '',
      ptid_Wenzhen: '',
      showWZDialog: false,
      ptdtShsjTxt: '',
      interview1: '',
      // 检查列表 检查所见检查意见 左边树形控件部分
      defaultProps1: {
        children: 'children',
        label: 'label'
      },
      maxSize: 10,
      // 检查日期的选择
      TimeOptions: [
        '检查日期',
        '报告日期',
        '审核日期'
      ], //
      // 单选框
      radio: 1,
      radio1: 1,
      // 日期选择器
      value: '',
      value1: '',
      value2: '',
      // 搜索表单
      checkMap: {
        ptdtPatientId: true, // 患者id
        ptName: true, // 姓名
        ptdtCheckCode: true, // 检查号
        spell: true, // 拼音
        patientNumber: true // 门诊号
      }, // 选择框
      searchForm: {
        searchQuery: '', // 高级查询搜索框
        equipment: '', // 设备名称
        ptdtPatientId: '', // 患者id
        ptName: '', // 姓名
        ptdtCheckCode: '', // 检查号
        patientNumber: '', // 门诊号
        spell: '', // 拼音
        ptdtCheckMachine: '',
        checkItem: '', // 检查项目名
        checkState: '', // 检查状态
        myReport: '', // 我的报告
        changeTime: '', // 指定时间查询 （今天 昨天...）
        startTime: '',
        endTime: '',
        pageNum: 1,
        pageSize: 14
      },
      searchQuery: '', // 高级查询搜索框
      startTime: '',
      endTime: '',
      changeTime: '', // 指定时间查询 （今天 昨天...）
      // 高级查询
      includeMedicalHistory: false,
      includeExamResults: false,
      includeExamOpinions: false,
      // 数据列表
      reportList: [], // 所有数据
      currentRow: {},
      bgReadyTxt: null, // 病史
      follow: {}, // 随访
      checkSee: {}, // 检查所见
      checkOpinion: {}, // 检查意见
      total: 0, // 表格数据总条数
      pageNum: 1, // 页数
      pageSize: 10, // 每页大小
      listLoading: false, // 加载动画
      drawer: false,

      downCheckData: null, // 检查项目-下拉框
      dropDownStateData: null, // 检查状态-下拉框
      completeStatusData: null, // 我的报告-下拉框
      searcheCondition: {}, // 搜索条件

      equipmentList: [], // 设备列表
      equipment: {}, // 当前设备

      albumpic_big: '',
      showAdvancedDialog: false, // 控制弹窗显示与隐藏的变量

      topImg: {
        // 'PET/CT': require('../../assets/shebei_images/PETCT.jpg'),
        // 'SPECT/CT': require('../../assets/shebei_images/SPECT.jpg'),
        // 'PET/MR': require('../../assets/shebei_images/PETMR.jpg'),
        // 'BMD': require('../../assets/shebei_images/BMD.jpg'),
      },

      pageNum: 0, // 当前页码
      paginationSize: this.maxSize || Math.floor(this.totalPages), // 每页显示数量，如果没有传入则默认为总页数的整数部分
      pageList: [], // 所有页码列表
      imgupdate: process.env.VUE_APP_BASE_API + '/profile/upload/', // 服务器地址
      report: [], // 学生详情
      studentText: {
        // 学生
        reportId: '' // 报告编号
      },
      btnStatus: '', // 老师是否批改的状态
      openDescribe1: false,
      survey: null, // 患者病史
      checkSee: null, // 患者所见请求
      checkOpinion: null, // 患者意见请求
      bingshiIndex: '1',
      xulie: [], // 序列号---数据
      jietu: [], // 截图---数据
      isTree: false, // 模板显示隐藏
      filterText: '',
      treeData: [], // 树形数据
      treeData1: [],
      defaultProps: {
        children: 'children',
        label: 'label'
      },
      // 选择列表的数据
      checkedList: [],
      // 限制选择的数量
      limitNum: 2,
      activeName: 'first',
      // 截图---点击放大数据
      srcList: [], // 开启预览大图的功能
      loading: false,
      FunctionsOptions: ['PTFC', 'PETCT', 'PETMR3D', 'PETMR2D'],
      selectFunction: '',
      // 编辑弹窗
      // 用来存放截图
      activeName2: 'first',
      formInline2: {
        user: '111',
        region: ''
      },
      patientInfo2: {},
      checkNameList2: [],
      checkXxjList: [],
      ptdeId2: '',
      patientId2: '',
      ptdtOperDatetime2: '',
      PtPatientVo2: {},
      PtPatientVo3: {},
      defaultProps2: {
        label: 'label',
        children: 'children'
      },
      hisurl: [],
      hisurls: [],
      // 截图
      imgs: [],
      url: [],
      urls: [],
      //
      data2: [],
      DetailslList2: {},
      Survey2: {},
      HistoryVo2: [],
      TemplateInfo2: {},
      TemplateInfo3: {
        label: ''
      },
      //
      studyInsta2: '',
      tableList: [],
      tableList1: [],
      pageNum: 1,
      pageSize: 14,
      select_num: 0,
      // 选择序列
      studentArr: [],
      checkAll: false,

      isIndeterminate: true,
      select_list: [],

      checkFun: '',
      funs: [
        {
          label: 'PETMR2D',
          value: '1'
        },
        {
          label: 'PETMR3D',
          value: '2'
        },
        {
          label: 'PETCT',
          value: '3'
        },
        {
          label: 'NM2D',
          value: '4'
        },
        {
          label: 'PTFC',
          value: '5'
        }
      ],
      multipleSelection: [],
      activeName: 'first',
      // 状态管理--数组
      trClasses: [
        {
          name: [
            '已预约',
            '已登记',
            '已报到',
            '已注射',
            '采集中',
            '已采集',
            '已取消'
          ],
          trClassName: 'initial-row'
        },
        {
          name: ['待报告', '报告中', '已报告', '退回'],
          trClassName: 'reports-row'
        },
        {
          name: ['待审核', '审核中', '已退回'],
          trClassName: 'audit-ing-row'
        },
        {
          name: ['已审核'],
          trClassName: 'audit-end-row'
        },
        {
          name: ['待复审', '复审中'],
          trClassName: 'review-ing-row'
        },
        {
          name: ['已复审'],
          trClassName: 'review-end-row'
        }
      ],
      show: 0,
      noshow: 1,
      KSJ: '',
      KYJ: '',
      pzchecked: false,
      jlchecked: 0,
      jlcheckedList: [],
      jlcheckedLista: [],
      editableTabsValue: '0',
      editableTabs: [],
      maxTabsAllowed: 2,
      tabIndex: 2,
      dialogVisible: false,
      selectAll: false,
      cxvalue: '',
      cxoptions: [
        {
          value: '1',
          label: '姓名'
        },
        {
          value: '0',
          label: '检查号'
        }
      ],
      userName1: '', //  当前正在操作的用户的名称
      hisSearchvalue: '',
      hisSearchList: [],
      id: '',
      mbtitle: '',
      mbgender: '',
      mbsaveList: {},
      mbsaveTxt: '',
      jwchecked: '',
      TabPtdetailTailPatientVO1: {
        current: 0,
        currentSize: 10
      },
      list1: null,
      elimg: 30,
      imgbs: '小图标',
      imgchangeTxt: '',
      deleteimgList: [],
      allimgnumber: '',
      selectimgnumber: 0,
      isHighlighted: false,
      mbappendList: {},
      convertedData: {},
      converteddata: {},
      editchangeTab: [],
      ptdtBgDoctorList: [],
      ptdtShDoctorList: [],
      ptdtFsDoctorList: [],
      qtptdtStatus: '',
      qtptdtBgDoctor: '',
      qtptdtShDoctor: '',
      qtptdtShDoctor2: '',
      qtptdtBranch: '',
      checkBranchList: {},
      qtchangetxt: '',
      originalptdtStatus: '',
      originalBgDoctor: '',
      originalShDoctor: '',
      originalShDoctor2: '',
      checkingStatusItems: {},
      dialogVisible_CheckList: false,
      shouldShowDemo1: true,
      shouldShowDemo2: true,
      shouldShowDemo3: true,
      shouldShowDemo30: false,
      shouldShowDemo4: true,
      shouldShowDemo5: true,
      shouldShowDemo6: true,
      shouldShowDemo7: true,
      shouldShowDemo8: true,
      shouldShowDemo9: true,
      shouldShowDemo10: true,
      shouldShowDemo11: true,
      shouldShowDemo12: true,
      shouldShowDemo13: false,
      shouldDisabled1: false,
      shouldDisabled2: false,
      shouldDisabled3: false,
      shouldDisabled4: false,
      shouldDisabled5: false,
      shouldDisabled6: false,
      shouldDisabled7: false,
      shouldDisabled8: false,
      shouldDisabled9: false,
      shouldDisabled10: false,
      shouldDisabled11: false,
      shouldDisabled12: false,
      shouldDisabled13: false,
      shouldDisabled14: false,
      backnumber: 0,
      info: '',
      selectedRows: [],
      DoctorAndTime: [{
        status: '',
        doctor: '',
        time: ''
      },
      {
        status: '',
        doctor: '',
        time: ''
      },
      {
        status: '',
        doctor: '',
        time: ''
      }]
    }
  },
  computed: {
    isTree2() {
      if (this.isTree) {
        return '关闭模板'
      } else {
        return '查看模板'
      }
    },
    infos() {
      return this.$store.state.userModule.infos
    }
  },
  watch: {
    reportList: {
      deep: true,
      handler(list) {
        list.forEach((item) => {
          // 判断检查状态
          switch (item.status) {
            case '0':
              item.statusName = '待审核'
              item.color = 'rgb(192,193,254)'
              item.itemicon = 'el-icon-document'
              break
            case '1':
              item.statusName = '已登记'
              item.color = 'rgb(255,255,255)'
              item.itemicon = 'el-icon-timer'
              break
            case '2':
              item.statusName = '已复审'
              item.color = 'rgb(127,128,0)'
              item.itemicon = 'el-icon-printer'
              break
          }
        })
        console.log(11111111111111, list)
      }
    },
    filterText(val) {
      this.$refs.tree.filter(val)
    }
  },
  beforeMount() {
    // this.getDoctorAndTime()
    if (this.studentText.reportId) {
      this.getStudentReportInfo(this.studentText.reportId)
    }
  },
  mounted() {
    this.openTab('history')
    // this.dragControllerDiv()
  },
  created() {
    // axios({
    //   url: 'http://172.20.128.6:8080/report/teacher/timeAndDoctor/99349',
    //   method: 'get'
    //   // params: {
    //   //   id: 99349
    //   // }
    // }).then(result => {
    //   console.log(result)
    // }).catch(error => {
    //   console.error('获取医生及时间出错:', error)
    // }),
    this.downCheckName() // 检查项目下拉框
    this.DownState() // 检查状态下拉框
    this.getEquipmentData() // 获取设备列表
    this.getDropDownCheckName()
    // this.getDropDownCheckMachine()
    this.getDropDownXxj()
    this.getDropDownBranch()
    this.getDropDownDoctor()
    this.getDropDownModelName()
    this.getList(this.searchForm)
    // this.getDropDownCheckName()
    this.getDropDownState()
    this.loading = true
    console.log(this.$route)
    this.editableTabsValue = 'defaultTab'
    this.jlcheck(this.jlchecked, this.hisSearchList)
    this.jlcheck(this.jlchecked, this.hisSearchList)
    this.studentText.reportId = this.$route.params.id // 报告id
    this.btnStatus = this.$route.query.status // 老师批改状态

    // console.log(this.$store.state.user.infos.roles)
    // console.log(this.$store.state.user)

    if (this.studentText.reportId) {
      this.getStudentReportInfo(this.studentText.reportId) // 患者数据
      getSurvey(this.studentText.reportId).then((res) => {
        // 患者病史
        if (res.code == 200) {
          this.survey = res.data.map((item) => {
            item.ptdtCheckDate = dayjs(item.ptdtCheckDate).format('YYYY-MM-DD')
            return item
          })

          console.log(this.survey[0])
        }
      })
      getCheckSee(this.studentText.reportId).then((res) => {
        // 对其中的时间数据进行格式化
        this.checkSee = res.data.map((item) => {
          item.ptdtCheckDate = dayjs(item.ptdtCheckDate).format('YYYY-MM-DD')
          return item
        })
      })

      getCheckOpinion(this.studentText.reportId).then((res) => {
        // 患者意见请求
        if (res.code == 200) {
          this.checkOpinion = res.data
        }
      })
    }
    templateData()
      .then((res) => {
        if (res.code == 200) {
          this.treeData = res.data.public
        }
      })
      .finally(() => {
        this.loading = false
      })
  },
  activated() {
    this.getEquipmentData()
  },
  updated() {
    this.checkDoctor()
    this.buttonShowOrNot()
    this.buttonDisabled()
  },
  computed: {
    hasSelected() {
      if(this.selectedRows.length == 1){
        return 1;
      }else {
        return 0;
      }
    },
    totalPages() {
      return Math.ceil(this.total / this.pageSize); // 计算总页数
    },
    pageSize() {
      return 10; // 每页显示的数据量
    }
  },
  methods: {
    updateDescription() {
      const data = {
        imageID: this.imageID_req,
        imageDescription: this.newDescription
      }
      console.log(data);

      teacher.changeImgDes(data).then(res => {
        setTimeout(() => {
          this.$message.success("修改成功！")
          this.openDescribe1 = false;
        }, 200);
      }).catch(error => {
        this.$message.error("修改失败！")
        this.openDescribe1 = false;
        }
      )
      this.handleNodeClick2()

    },
    openDescribe(item) {
      console.log(item);
      this.imageDescription_req = item.imageDescription
      this.imageID_req = item.imageID
      this.newDescription = item.imageDescription; // 设定新的描述为当前项的描述
      this.currentIndex = this.urls.indexOf(item); // 记录当前项的索引
      this.openDescribe1 = true; // 打开弹窗
    },
    saveRecord(){
      if(this.ptdeId1 == ''){
        this.$message.error("请进行预览后再保存")
        return 1;
      }
        const data = {
        surPtdeid: this.ptdeId1,
        followTag: this.interview1,
        followResult: this.ptdtShsjTxt
      }
      teacher.serveFollow(data)
      .then(response => {
        this.$message.success("保存成功！")
        // 处理成功逻辑
      })
      .catch(error => {
      });
    },
    //上传图片成功后回调
    handleAvatarSuccess (response, file, fileList) {
          },
    //上传图片前回调函数
    beforeUpload(file) {
      if (file) {
        const suffix = file.name.split('.').pop().toLowerCase(); // 获取文件后缀并转换为小写
        const sizeLimitMB = 10; // 设置新的文件大小限制 (10MB)
        const fileSizeMB = file.size / 1024 / 1024; // 将文件大小转换为 MB

        if (['png', 'jpeg', 'jpg'].indexOf(suffix) < 0) {
          this.$message.error('上传图片只支持 png、jpeg、jpg 格式！');
          this.$refs.upload.clearFiles();
          return false;
        }
        if (fileSizeMB > sizeLimitMB) {
          this.$message.error(`上传文件大小不能超过 ${sizeLimitMB}MB!`);
          return false;
        }

        const formData = new FormData();
        formData.append('file', file);
        formData.append('ptdeid', this.report.ptdeId);

        console.log(formData);


        teacher.uploadImage(formData);
        this.$message.success('上传成功!')
        setTimeout(() => {
        this.handleNodeClick2()
      }, 100)
      }
    },
    printTextTemp(){
      this.ptdeId2 = this.report.ptdeId
      teacher.printTextTemplate(this.ptdeId2).then(res => {
        this.$message.success(res.msg)
      })
    },

    printWord(){
      this.ptdeId2 = this.report.ptdeId
      console.log(this.ptdeId2);
      this.urls.forEach((url) => {
        if (url.selected === true) {
          // this.imgchangeTxt= 'http://172.20.128.6:8089/api/tspet/imagesMap?StudyInsta=' +url.path
          this.deleteimgList.push(url.imageID)
        }
      })
    const data = {
    ptdeid: this.ptdeId2,
    imageIdList: this.deleteimgList
  };

    teacher.printWord(data).then(res => {
      this.$message.success(res.msg)
    })
    },

    handleSelectionChange1(selectedRows) {
      // 处理选中的行
      this.selectedRows = selectedRows
      if (this.selectedRows.length > 0) {
      const selectedRow = selectedRows[0]; // 获取第一个选中的行
      this.ptid_Wenzhen = selectedRow.ptdeId
    }
      teacher.getInterview(this.ptid_Wenzhen).then(res => {

        console.log(res.data);

        this.ptdtBgproreadyTxt = res.data.ptdtBgproreadyTxt
        this.ptdtLcdiagnousTxt = res.data.ptdtLcdiagnousTxt
        }).catch(error => {

        })
        },
    handleConsultation() {
        this.dialogVisible1 = true;
        const data = {
          ptdeid: this.ptid_Wenzhen,
          ptdtBgproreadyTxt: this.ptdtBgproreadyTxt,
          ptdtLcdiagnousTxt: this.ptdtLcdiagnousTxt
        }
        teacher.serveInterview(data).then(
          this.showWZDialog = false,
        ).catch()
        setTimeout(() => {
          this.$message.success("保存成功！")
        }, 200);
    },


    handleNodeClick3(nodeData, node){
      // 判断是否是叶子节点
      if (!nodeData.children || nodeData.children.length === 0) {
        let imgName = nodeData.label;
        console.log(imgName);

        // 请求 Base64 图片数据
        teacher.getCheckListImg(imgName).then(response => {
          if (response.data) {
            // 如果数据非空，则展示图片
            this.imageBase64 = 'data:image/jpeg;base64,' + response.data;
            console.log(response  );

          } else {
            // 如果数据为空，清空图片并显示提示信息
            this.imageBase64 = '';
          }

          // 显示弹窗组件
          this.dialogVisible_CheckList = true;
        }).catch(error => {
          console.error("获取图片失败:", error);
          this.imageBase64 = ''; // 出错时也清空图片
          this.dialogVisible_CheckList = true; // 仍然显示弹窗，告知用户图片加载失败
        });
      }
    },

    // 格式化数据函数
    formatTreeData(responseData) {
      const { imSerialnameAndCount1, ptNameAndCheckCodeAndCheckData } = responseData;

      // 将 imSerialnameAndCount1 转换为树形结构
      const treeData1 = [
        {
          label: ptNameAndCheckCodeAndCheckData,
          children: Object.keys(imSerialnameAndCount1).map((key) => ({
            label: key,
            children: imSerialnameAndCount1[key].map((item) => ({
              label: item
            }))
          }))
        }
      ];

      return treeData1;
    },
    // 左右伸缩按钮
    dragControllerDiv2() {
      console.log('触发事件')
      var resize = document.getElementsByClassName('resize2')
      var left = document.getElementsByClassName('container-leftt')
      var mid = document.getElementsByClassName('container-rightt')
      var box = document.getElementsByClassName('container-parent-bottom')
      console.log(box[0])
      for (let i = 0; i < resize.length; i++) {
        console.log('鼠标按下了')
        // 鼠标按下事件
        resize[i].onmousedown = function(e) {
          // 颜色改变提醒
          resize[i].style.background = '#818181'
          var startX = e.clientX
          resize[i].left = resize[i].offsetLeft
          // 鼠标拖动事件
          document.onmousemove = function(e) {
            var endX = e.clientX
            var moveLen = resize[i].left + (endX - startX) // （endx-startx）=移动的距离。resize[i].left+移动的距离=左边区域最后的宽度
            var maxT = box[i].clientWidth - resize[i].offsetWidth // 容器宽度 - 左边区域的宽度 = 右边区域的宽度

            // if (moveLen < 32) moveLen = 32; // 左边区域的最小宽度为32px
            // if (moveLen > maxT - 150) moveLen = maxT - 150; //右边区域最小宽度为150px

            resize[i].style.left = moveLen // 设置左侧区域的宽度

            for (let j = 0; j < left.length; j++) {
              left[j].style.width = moveLen + 'px'
              mid[j].style.width = (box[i].clientWidth - moveLen - 10) + 'px'
            }
          }
          // 鼠标松开事件
          document.onmouseup = function(evt) {
            // 颜色恢复
            resize[i].style.background = '#d6d6d6'
            document.onmousemove = null
            document.onmouseup = null
            resize[i].releaseCapture && resize[i].releaseCapture() // 当你不在需要继续获得鼠标消息就要应该调用ReleaseCapture()释放掉
          }
          resize[i].setCapture && resize[i].setCapture() // 该函数在属于当前线程的指定窗口里设置鼠标捕获
          return false
        }
      }
    },
    // 检查列表 下方上下伸缩按钮
    dragControllerDiv1() {
      console.log('触发事件')
      const resize = document.getElementsByClassName('resize1')
      const top = document.getElementsByClassName('container-parent-top')
      const bottom = document.getElementsByClassName('container-parent-bottom')
      const box = document.getElementsByClassName('container-parent1')

      for (let i = 0; i < resize.length; i++) {
        console.log('鼠标按下了')
        // 鼠标按下事件
        resize[i].onmousedown = function(e) {
          // 颜色改变提醒
          resize[i].style.background = '#818181'

          // 记录初始鼠标位置的Y坐标
          const startY = e.clientY
          const initialTopHeight = top[0].clientHeight
          const initialBottomHeight = bottom[0].clientHeight

          // 鼠标拖动事件
          document.onmousemove = function(e) {
            const endY = e.clientY
            const moveLen = initialTopHeight + (endY - startY) // 计算移动距离

            const maxHeight = box[0].clientHeight - resize[i].offsetHeight - 10
            const minHeight = 0

            if (moveLen >= minHeight && moveLen <= maxHeight) {
              top[0].style.height = moveLen + 'px'
              bottom[0].style.height = (box[0].clientHeight - moveLen - resize[i].offsetHeight) + 'px'
            }
          }

          // 鼠标松开事件
          document.onmouseup = function() {
            // 颜色恢复
            resize[i].style.background = '#d6d6d6'
            document.onmousemove = null
            document.onmouseup = null
          }

          return false
        }
      }
    },
    dragControllerDiv() {
      console.log('触发事件')
      var resize = document.getElementsByClassName('resize')
      var left = document.getElementsByClassName('container-parent-left')
      var mid = document.getElementsByClassName('container-parent-right')
      var box = document.getElementsByClassName('container-parent')
      console.log(box[0])
      for (let i = 0; i < resize.length; i++) {
        console.log('鼠标按下了')
        // 鼠标按下事件
        resize[i].onmousedown = function(e) {
          // 颜色改变提醒
          resize[i].style.background = '#818181'
          var startX = e.clientX
          resize[i].left = resize[i].offsetLeft
          // 鼠标拖动事件
          document.onmousemove = function(e) {
            var endX = e.clientX
            var moveLen = resize[i].left + (endX - startX) // （endx-startx）=移动的距离。resize[i].left+移动的距离=左边区域最后的宽度
            var maxT = box[i].clientWidth - resize[i].offsetWidth // 容器宽度 - 左边区域的宽度 = 右边区域的宽度

            // if (moveLen < 32) moveLen = 32; // 左边区域的最小宽度为32px
            // if (moveLen > maxT - 150) moveLen = maxT - 150; //右边区域最小宽度为150px

            resize[i].style.left = moveLen // 设置左侧区域的宽度

            for (let j = 0; j < left.length; j++) {
              left[j].style.width = moveLen + 'px'
              mid[j].style.width = (box[i].clientWidth - moveLen - 10) + 'px'
            }
          }
          // 鼠标松开事件
          document.onmouseup = function(evt) {
            // 颜色恢复
            resize[i].style.background = '#d6d6d6'
            document.onmousemove = null
            document.onmouseup = null
            resize[i].releaseCapture && resize[i].releaseCapture() // 当你不在需要继续获得鼠标消息就要应该调用ReleaseCapture()释放掉
          }
          resize[i].setCapture && resize[i].setCapture() // 该函数在属于当前线程的指定窗口里设置鼠标捕获
          return false
        }
      }
    },
    // table表格选择事件
    checkSelectable(row) {
      // console.log(row);
      return this.multipleSelection.length < 2 ||
        (row.seriesInst == this.select_list[0].seriesInst ||
          row.seriesInst == this.select_list[1].seriesInst)
    },
    updateEditorContent() {},
    // getTemplateInfo2a() {},
    // getTemplateInfo2b() {},
    setBgColor(bgColor) {
      if (bgColor === '' || bgColor === '' || bgColor === undefined) {
        return { background: 'url(' + bgColor + ') center center no-repeat' }
      } else {
        return {
          background: 'url(' + bgColor + ') center center no-repeat'
        }
      }
    },
    async downCheckName() {
      // 获取-检查项目下拉框
      const data = await getDropDownCheckName()
      this.downCheckData = data.data
    },
    async DownState() {
      // 获取-检查状态下拉框
      const data = await getDropDownState()
      console.log(data)
      this.dropDownStateData = data.data
    },
    async completeStatus() {
      // 获取-我的报告下拉框
      const data = await getCompleteStatus()
      const arr = []
      for (const key in data.data) {
        const obj = {}
        if (key == 0) {
          obj.id = key
          obj.status = '未完成'
        } else if (key == 1) {
          obj.id = key
          obj.status = '已完成'
        } else if (key == 2) {
          obj.id = key
          obj.status = '已批改评分'
        }
        arr.push(obj)
      }
      this.completeStatusData = arr
    },
    async getSurveyData(reportId) {
      // 浏览---病史
      const data = await getSurvey(reportId)
      this.bgReadyTxt = data.data
    },
    async getBgReadyTxtData(reportId) {
      // 浏览---随访结果
      const data = await getBgReadyTxt(reportId)
      this.follow = data.data
    },
    async getCheckSeeData(reportId) {
      // 浏览---检查所见
      const data = await getCheckSee(reportId)
      this.checkSee = data.data
    },
    async getCheckOpinionData(reportId) {
      // 浏览---检查意见
      const data = await getCheckOpinion(reportId)
      this.checkOpinion = data.data
    },

    async getEquipmentData() {
      // 获取设备
      const res = await getEquipment()
      if (res.code == 200) {
        this.equipmentList = res.equipment.map((item) => {
          return { equipmentName: item.equipmentName, id: item.id }
        })
        this.checkMachineList = this.equipmentList
        console.log(this.checkMachineList, '--------------')
      }
    },

    generateNodeContent(item) {
    // 和之前一样，生成节点显示的内容
      return `${item.seriesNumber} - ${item.modality}-${item.seriesDescription}-${item.bodyPartExamined} - ${item.seriesPat} - ${item.seriesDate} - ${item.seriesTime} - ${item.numFrames} - ${item.numSerRelIma} - ${item.radionuclideTotalDose} - ${item.manufacturer} - ${item.modelName}`
    },

    getList(obj) {
      // 获取第一页数据
      this.listLoading = true // 加载动画
      console.log('传递的参数', obj)

      patientInfoList(obj).then((res) => {
        this.listLoading = false // 隐藏动画
        let { rows, total } = res
        this.total = total
        this.reportList = rows
        console.log('reportList', rows)
      })
      setTimeout(() => {
        this.dragControllerDiv1()
        this.dragControllerDiv2()
      }, 1000)
    },
    mounted() {
      this.getCheckName()
      this.pageList = Array.from({ length: this.paginationSize + 1 }) // 将所有页码添加到列表中，包括首页和尾页
    },

    changePages(pageNum) {
      // 切换页码
      this.pageNum = pageNum
      const params = { pageNum: this.pageNum, pageSize: this.pageSize }
      const obj = this.searcheCondition
      const newObj = Object.assign(params, obj)
      this.getList(newObj)
    },

    prevPage() {
      if (this.pageNum > 1) {
        this.pageNum--;
        this.changePages(this.pageNum);
      }
    },
    nextPage() {
      if (this.pageNum < this.totalPages) {
        this.pageNum++;
        this.changePages(this.pageNum);
      }
    },

    overview(objData) {
      // 点击浏览
      this.ptdeId1 = objData.ptdeId
      this.drawer = true
      const { reportId } = objData
      this.getSurveyData(reportId)
      this.getBgReadyTxtData(reportId)
      this.getCheckSeeData(reportId)
      this.getCheckOpinionData(reportId)
      this.getStudentReportInfo(reportId)
      console.log(reportId);
      teacher.getTreeList(this.ptdeId1).then(response => {
        const formattedData = this.formatTreeData(response.data);
        this.treeData1 = formattedData;
        console.log(123);
      })

      teacher.getFollow(this.ptdeId1).then(res => {
        console.log(res.data)
        // 根据后端数据更新 Vue 数据
        this.interview1 = res.data.followTag;
        this.ptdtShsjTxt = res.data.followResult;
      }).catch(error => {
        this.interview1 = null
        this.ptdtShsjTxt = ''
      })
    },

    open() {
      // this.downloadSoft()
      console.log('open 被触发')
      const fn_type = 'PTFC'
      const action = 'open'
      this.invokeSoftware(fn_type, action)
    },
    downloadSoft() {
      this.$confirm('是否下载下载器软件？')
        .then(_ => {
          setTimeout(() => {
            window.location.href = `http://120.27.23.108:8087/tspetsetup1.0.3.exe`
          }, 3000)
          window.location.href = `http://120.27.23.108:8087/融合软件[TEST].x64.20230810-FULL.rar`
        })
        .catch(_ => {
        })
    },
    append() {
      // this.downloadSoft()

      console.log('append 被触发')
      const fn_type = 'PTFC'
      const action = 'append'
      this.invokeSoftware(fn_type, action)
    },
    // 请求信息
    invokeSoftware(fn_type, action) {
      let uuid01 = uuidv4()
      uuid01 = uuid01.replace(/-/g, '')
      // console.log('uuid01 = ' + uuid01)
      const msg = {
        function: fn_type,
        action: action,
        uuid: uuid01,
        series: this.select_list
      }
      // console.log(JSON.stringify(msg))
      teacher.getResponseStatus(JSON.stringify(msg)).then(response => {
        console.log('teacher.getResponseStatus调用')
        if (response.code == 200) {
          // console.log('ok')
          try {
            // 调试用

            // throw '未下载';
            window.location.href = `tspet://${action}/${uuid01}`
            console.log('href ok')
          } catch (error) {
            console.log(' error===> ' + error)
            // 下载对应软件
            setTimeout(() => {
              window.location.href = `http://172.20.128.6:8087/tspetsetup1.0.3.exe`
            }, 3000)
            window.location.href = `http://172.20.128.6:8087/融合软件[TEST].x64.20230810-FULL.rar`
          }
        }
      })
    },

    doEdit(objData) {
      // 编辑按钮
      console.log('点击编辑的数据', objData)
      const { reportId, status } = objData
      this.$router.push({
        path: `/report/editReport/${reportId}`,
        query: { status }
      })
      setTimeout(() => {
        this.openEdit()
      }, 1000)
    },

    contrast(objData) {
      // 对比数据
      const { reportId, status } = objData
      console.log(objData)
      this.$router.push({
        name: 'Contrast',
        query: { reportId, status },
        params: {}
      })
    },

    doSearch() {
      // 高级查询弹窗关闭
      this.showAdvancedDialog = false
      // 搜索
      this.pageNum = 1
      this.pageSize = 10
      const params = {
        searchQuery: this.searchForm.searchQuery,
        pageNum: this.pageNum,
        pageSize: this.pageSize,
        ptdtCheckMachine: this.searchForm.ptdtCheckMachine,
        changeTime: this.searchForm.changeTime,
        startTime: this.searchForm.startTime,
        endTime: this.searchForm.endTime
      }
      const obj = {}
      for (const key in this.checkMap) {
        if (this.checkMap[key]) {
          obj[key] = this.searchForm[key]
        }
      }
      // 判断检查状态
      this.dropDownStateData.forEach((item) => {
        if (item.statuscn == this.searchForm.checkState) {
          obj.ptdtStatus = item.status
        }
      })

      obj.ptdtCheckName = this.searchForm.checkItem

      if (this.searchForm.myReport == '未完成') {
        obj.status = '0'
      } else if (this.searchForm.myReport == '已完成') {
        obj.status = '1'
      } else if (this.searchForm.myReport == '已批改评分') {
        obj.status = '2'
      }
      const newObj = Object.assign(params, obj)
      console.log('搜索参数', newObj)
      this.getList(newObj)
    },

    empty() {
      // 清空---按钮
      for (const key in this.searchForm) {
        this.searchForm[key] = ''
      }
      this.$set(this.searchForm, 'dateTime', '不指定')
      this.$set(this.searchForm, 'print', '不指定')
      this.$set(this.searchForm, 'equipment', '不指定')
      this.doSearch()
    },

    // 保存
    onSubmit2() {
      this.$confirm('确定保存, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        // this.report.patientId = this.report
        // delete this.report.ptdeId
        // this.report.ptdtCheckSjTxt = this.report.jcSjTxt
        // this.report.ptdtCheckyjTxt = this.report.jcYjTxt
        console.log(this.report)
        teacher.updatePatient(this.report)
          .then(response => {
            this.$message({
              type: 'success',
              message: '保存成功!'
            })
            this.editDialogVisible = false
            // this.getList()
          })
      })
    },
    updateEditorContent() {},
    changeEquipmen(e) {
      // 选择设备标题
      this.equipment = e
      const params = {
        pageNum: this.pageNum,
        pageSize: this.pageSize,
        ptdtCheckMachine: this.equipment
      }
      this.searchForm.ptdtCheckMachine = this.equipment
      console.log(this.ptdtCheckMachine, 'changeEquipmen')
      const obj = Object.assign(params, this.searcheCondition)
      const str = e.item.equipmentName
      this.albumpic_big = this.topImg[str]
    },

    // 序号
    indexMethod(index) {
      return index
    },

    // 点击复选框时触发
    handleSelectChange(list) {
      if (list.length > this.limitNum) {
        this.limitFn(list)
        return
      }
      // 获取所有的数据
      this.checkedList = list
      // this.checkedList = [...list];
    },
    // 限制选择数量
    limitFn(list) {
      this.$refs.multipleTable.clearSelection()
      for (let i = 0; i < this.limitNum; i++) {
        this.$refs.multipleTable.toggleRowSelection(list[i])
      }
    },
    // 判断复选框是否可以选择
    selectable(row) {
      const index = this.checkedList.findIndex(
        (v) => v.seriesInst === row.seriesInst
      )
      if (this.checkedList.length >= this.limitNum) {
        if (index !== -1) {
          return true
        } else {
          return false
        }
      } else {
        return true
      }
    },
    downloadSoft() {
      this.$confirm('是否下载下载器软件？')
        .then((_) => {
          setTimeout(() => {
            window.location.href = `http://120.27.23.108:8087/tspetsetup1.0.3.exe`
          }, 3000)
          window.location.href = `http://120.27.23.108:8087/融合软件[TEST].x64.20230810-FULL.rar`
        })
        .catch((_) => {})
    },

    // 点击追加按钮
    async handleAppend() {
      if (this.checkedList.length > 0) {
        // 生成uuid
        const uuv4 = uuidv4()
        let uuid = ''
        // 加工处理得到需要的uuid
        uuv4.split('-').forEach((item) => {
          uuid += item
        })
        if (this.selectFunction == '') {
          this.$message.error('请选择函数方式')
          return
        }
        console.log('action', uuid)
        const list = {
          function: this.selectFunction,
          action: 'append',
          uuid,
          series: [...this.checkedList]
        }
        console.log(list, 'ffsdddssd')
        const res = await SendActions(list)
        if (res.code == 200) {
          window.location.href = `tspet://append/${uuid}`
          setTimeout(() => {
            this.$message.error('你还没有软件，开始下载')
            axios.get('http://120.27.23.108:8087/tspetsetup1.0.3.exe')
            axios.get(
              'http://120.27.23.108:8087/融合软件[TEST].x64.20230810-FULL.rar'
            )
          }, 2000)

          // console.log('13454641347674')
        }
      } else {
        this.$message.error('你还未选择，请先选择')
      }
    },

    // 点击保存按钮
    async handleSave() {
      if (this.checkedList.length > 0) {
        // 生成uuid
        const uuv4 = uuidv4()
        let uuid = ''
        uuv4.split('-').forEach((item) => {
          uuid += item
        })
        if (this.selectFunction == '') {
          this.$message.error('请选择函数方式')
          return
        }
        const list = {
          function: this.selectFunction,
          action: 'open',
          uuid,
          series: [...this.checkedList]
        }
        // console.log(list)
        const res = await SendActions(list)
        // console.log(res)
        if (res.code == 200) {
          try {
            window.location.href = `tspet://open/${uuid}`
          } catch (error) {
            this.$message.error('你还没有软件，开始下载')
            await axios.get('http://120.27.23.108:8087/tspetsetup1.0.3.exe')
            await axios.get(
              'http://120.27.23.108:8087/融合软件[TEST].x64.20230810-FULL.rar'
            )
          }
        }
      } else {
        this.$message.error('你还未选择，请先选择')
      }
    },
    // 点击下载
    handleDownLoad(e) {
      console.log(e)
    },

    // async getInfo() {
    //   const token = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjM4ZWU2MDA4LTBlMWUtNDQzYS1hZjIxLWQ1YTE4NmU5MWQ2YyJ9.pynWGMPH_nn-h2OG_KZurweLM9AKmAXo-ozXLuMjhoMYl1rvnCGwB0CA-mc7HaP4022JrMEowoy6mMBEUPEeTw'
    //   const data = await getInfo(token)
    //   console.log('账户信息')
    //   console.log(data)
    //   console.log('账户信息')
    // },

    async getStudentReportInfo(reportId) {
      // 初始渲染数据
      const data = await studentReportInfo(reportId)
      this.report = data.data
      setTimeout(() => {
        this.qtptdtStatus = this.report.ptdtStatus
        this.qtptdtBranch = this.report.ptdtBranch
        this.qtptdtBgDoctor = this.report.ptdtBgDoctor
        this.qtptdtShDoctor = this.report.ptdtShdoctor
        this.qtptdtShDoctor2 = this.report.ptdtShdoctor2
        this.checkingStatusItems = this.ptdtStatusList.filter(item => item.status === this.qtptdtStatus)


        this.DoctorAndTime = [{
          status: '',
          doctor: '',
          time: ''
        },
        {
          status: '',
          doctor: '',
          time: ''
        },
        {
          status: '',
          doctor: '',
          time: ''
        }]
        if ((this.report.ptdtBgDoctor != null) && (this.report.ptdtReportdate != null) && (this.report.ptdtBgDoctor != '')) {
          this.DoctorAndTime[0].status = '【报告】'
          this.DoctorAndTime[0].doctor = this.report.ptdtBgDoctor
          this.DoctorAndTime[0].time = this.report.ptdtReportdate
          if ((this.report.ptdtShdoctor != null) && (this.report.ptdtShdate != null) && (this.report.ptdtShdoctor != '')) {
            this.DoctorAndTime[1].status = '【审核】'
            this.DoctorAndTime[1].doctor = this.report.ptdtShdoctor
            this.DoctorAndTime[1].time = this.report.ptdtShdate
            if ((this.report.ptdtShdoctor2 != null) && (this.report.ptdtShdate2 != null) && (this.report.ptdtShdoctor2 != '')) {
              this.DoctorAndTime[2].status = '【复审】'
              this.DoctorAndTime[2].doctor = this.report.ptdtShdoctor2
              this.DoctorAndTime[2].time = this.report.ptdtShdate2
            }
          }
        }
      }, 10)
      // this.getSequenceList(this.report.studyInsta)
      // this.getPictureList(this.report.studyInsta)
    },

    // studyInsta
    async getSequenceList(studyInsta) {
      // 获取序列号
      console.log(studyInsta)
      const res = await getSequence(studyInsta)
      if (res.code == 200) {
        this.xulie = res.data
      }
    },



    saveTemp() {
      // 暂时保存
      this.studentText.jcProReadyTxt = this.report.jcProReadyTxt
      this.studentText.jcReadyTxt = this.report.jcReadyTxt
      this.studentText.jcSjTxt = this.report.jcSjTxt
      this.studentText.jcYjTxt = this.report.jcYjTxt

      getSaveEdit(this.studentText).then((res) => {
        if (res.code == 200) {
          this.$message({
            type: 'success',
            message: '暂时保存成功！'
          })
        }
      })
    },

    async subReportData(options) {
      // 提交报告接口
      getUpdateEdit(options).then((res) => {
        if (res.code == 200) {
          this.$message({
            type: 'success',
            message: '报告保存成功！'
          })
        }
      })
    },

    async getPictureList(studyInsta) {
      // 获取截图
      const res = await getImages(studyInsta)
      console.log(res.data, 'asdasds')
      if (res.code == 200) {
        this.jietu = res.data
      }
    },

    submitReport() {
      // 点击---提交报告
      this.$confirm('是否提交报告?提交之后不可再修改', '提交报告', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.studentText.reportId = this.report.reportId
          this.studentText.jcProReadyTxt = this.report.jcProReadyTxt
          // this.studentText.jcReadyTxt = this.report.jcReadyTxt
          this.studentText.jcSjTxt = this.report.jcSjTxt
          this.studentText.jcYjTxt = this.report.jcYjTxt

          // if (this.report.jcSjTxt == null || this.report.jcYjTxt == null) {
          //   this.$message({
          //     type: 'error',
          //     message: '检查所见和检查意见不能为空！'
          //   })
          // } else {
          this.subReportData(this.studentText)
          this.$router.push({
            path: '/report/report',
            query: { reportId: this.report.reportId }
          })
          // }
        })
        .catch(() => {
          this.$message({
            type: 'info',
            message: '取消提交报告！'
          })
        })
    },

    filterNode(value, data) {
      if (!value) return true
      return data.label.indexOf(value) !== -1
    },

    // 点击节点
    handleNodeClick(data) {
      const { id, pid } = data
      templateInfo(id, pid).then((res) => {
        if (res.code == 200) {
          if (res.data) {
            const { libCheckSj, libCheckYj } = res.data
            this.report.jcSjTxt = libCheckSj
            this.report.jcYjTxt = libCheckYj
          }
        }
      })
    },

    tabClick(v) {
      console.log(v)
      console.log(this.editableTabsValue)
      console.log(111)
    },

    openTab(tabName) {
      // 隐藏所有内容
      const tabContents = document.querySelectorAll('.tab-content')
      tabContents.forEach((tab) => tab.classList.remove('active'))

      // 高亮当前选中的按钮
      const tabs = document.querySelectorAll('.tabs button')
      tabs.forEach((tab) => tab.classList.remove('active'))

      // 显示选定的内容
      const selectedTab = document.getElementById(tabName)
      const selectedButton = document.querySelector(
        '.tabs button[data-tab="' + tabName + '"]'
      )
      if (selectedTab && selectedButton) {
        selectedTab.classList.add('active')
        selectedButton.classList.add('active')
      }
    },
    openTab1(tabName) {
      // 隐藏所有内容
      const tabContents = document.querySelectorAll('.tab1-content')
      tabContents.forEach((tab) => tab.classList.remove('active'))

      // // 高亮当前选中的按钮
      // const tabs = document.querySelectorAll('.tabs1 button')
      // tabs.forEach(tab => tab.classList.remove('active'))

      // 显示选定的内容
      const selectedTab = document.getElementById(tabName)
      const selectedButton = document.querySelector(
        '.tabs1 button[data-tab="' + tabName + '"]'
      )
      if (selectedTab && selectedButton) {
        selectedTab.classList.add('active')
        selectedButton.classList.add('active')
      }
    },
    reload1() {
      location.reload()
    },
    // 添加tab页
    addTab(row) {
      if (this.editableTabs.length >= this.maxTabsAllowed) {
        this.$message.error('已达到最大标签页数量！');
        return;
      }
      this.getStudentReportInfo(row.reportId) // 患者数据
      const newTabName = ++this.tabIndex + ''
      const newTabData = {/* 你的数据属性 */ } // 创建新的数据对象
      console.log(row.ptdeId);
      this.ptdeId2 = row.ptdeId

      setTimeout(() => {
        const ptdeId = this.report.ptdeId;


      teacher.getCheckDate(row.ptdeId).then(res => {
        const date_check = res.msg;
        const formattedDate = date_check.split(" ")[0];

        const newTab = {
          title: `Tab ${newTabName}`,
          name: newTabName,
          content: this.report.ptName + ' - ' + formattedDate,
          reportId: this.report.reportId, // 将新的数据对象与标签页关联
          ptdeId2: this.ptdeId2
        }
        this.editableTabs.push(newTab) // 将新标签页添加到editableTabs数组中
        this.editableTabsValue = newTabName
        this.tabIndex = this.tabIndex + 1 // 更新tabIndex
        this.getDoctorAndTime(this.report.ptdeId)
      });
      this.handleNodeClick2()
      }, 100)
      setTimeout(() => {
        this.dragControllerDiv()
      }, 1000)
    },
    // 删除tab页
    removeTab(targetName) {
      this.editableTabsValue = this.editableTabs
        .filter(tab => tab.name !== targetName)
        .map(tab => tab.name) // 更新可选择的标签名列表
        [0] || '' // 如果列表为空，则设置为空字符串
      this.editableTabs = this.editableTabs.filter(tab => tab.name !== targetName)
      if (this.editableTabs.length === 0) {
        this.editableTabsValue = 'defaultTab' // 假设'defaultTab'是默认标签页的name
      }
      this.changeTab(this.editableTabsValue)
      // const index = this.editableTabs.findIndex(tab => tab.name === targetName)
      // if (index !== -1) {
      //   this.editableTabs.splice(index, 1) // 从editableTabs数组中删除标签页
      // }
      // this.editableTabsValue = this.editableTabs.length > 0 ? this.editableTabs[0].name : '' // 更新编辑的tabs值
      this.urls = []

    },
    // 转换Tab
    changeTab(targetName) {
      // console.log(789)
      // console.log(targetName)
      this.editchangeTab = this.editableTabs.filter(tab => tab.name == targetName)
      // console.log(this.editchangeTab)
      const editchangeReportId = this.editchangeTab[0].reportId
      this.ptdeId2 = this.editchangeTab[0].ptdeId2

      // console.log(editchangeReportId)
      setTimeout(() => {
        this.handleNodeClick2();
        this.getStudentReportInfo(editchangeReportId) // 患者数据
      })
    },
    handleClose(done) {
      this.$confirm('确认关闭？')
        .then((_) => {
          done()
        })
        .catch((_) => {})
    },
    // eslint-disable-next-line vue/no-dupe-keys
    selectAll() {
      this.urls.forEach((url) => {
        url.selected = this.selectAll // 切换选中状态
      })
    },
    mbappend(data) {
      const newChild = { id: id++, label: 'testtest', children: [] }
      if (!data.children) {
        this.$set(data, 'children', [])
      }
      data.children.push(newChild)
    },

    mbremove(node, data) {
      const parent = node.parent
      const children = parent.data.children || parent.data
      const index = children.findIndex((d) => d.id === data.id)
      children.splice(index, 1)
    },
    renderContent(h, { node, data, store }) {
      return (
        <span class='custom-tree-node'>
          <span>{node.label}</span>
          <span>
            <el-button
              size='mini'
              type='text'
              on-click={() => this.append(data)}
            >
              Append
            </el-button>
            <el-button
              size='mini'
              type='text'
              on-click={() => this.remove(node, data)}
            >
              Delete
            </el-button>
          </span>
        </span>
      )
    },
    // getList() {
    //   console.log(this.TabPtdetailTailPatientVO)
    //   console.log('返回数据：')
    //   teacher.getTeacherListPage(this.TabPtdetailTailPatientVO)
    //     .then(response => {
    //       console.log(response.data.tabPtdetailTailPatientVO)
    //       this.list = response.data.tabPtdetailTailPatientVO
    //       // 2023/5/9 补丁代码 开始 利用正则表达式,只取小数点前的时间
    //       console.log(this.list)
    //       const time = /.*(?=\.)/
    //       for (let index = 0; index < this.list.length; index++) {
    //         this.list[index].ptdtOperDatetime = time.exec(this.list[index].ptdtOperDatetime)
    //       }
    //       // 补丁代码 结束
    //       this.total = response.data.total
    //     })
    // },
    // 检查项目下拉框
    getDropDownCheckName() {
      teacher.getDropDownCheckName().then((response) => {
        this.checkNameList = response.data || {}
      })
    },
    // 获取检查类型
    getDropDownModelName() {
      teacher.getDropDownModelName().then((response) => {
        this.checkMachineList = response.data || {}
      })
    },
    // 获取医生
    getDropDownDoctor() {
      console.log('获取医生')
      // 报告医生
      // this.ptdtBgDoctorList = await getBgDoctorDropDown()
      // debugger
      // console.log(this.ptdtBgDoctorList)
      // console.log('获取报告医生')
      // // 审核医生
      // this.ptdtShDoctorList = await getShDoctorDropDown()
      // console.log(this.ptdtShDoctorList)
      // console.log('获取审核医生')
      // // 复审医生
      // this.ptdtFsDoctorList = await getFsDoctorDropDown()
      // console.log(this.ptdtFsDoctorList)
      // console.log('获取复审医生')
      teacher.getBgDoctorDropDown().then((response) => {
        this.ptdtBgDoctorList = response.data || {}
        console.log(this.ptdtBgDoctorList)
        const extractedNames = this.ptdtBgDoctorList.map(item => item.doctorName)
        this.ptdtBgDoctorList = extractedNames
        console.log('报告医生1')
        console.log(this.ptdtBgDoctorList)
        console.log('报告医生2')
      })
      // 审核医生
      teacher.getShDoctorDropDown().then(response => {
        this.ptdtShDoctorList = response.data || {}
        console.log(this.ptdtShDoctorList)
        const extractedNames = this.ptdtShDoctorList.map(item => item.doctorName)
        this.ptdtShDoctorList = extractedNames
        console.log(this.ptdtShDoctorList)
      })
      // 复审医生
      teacher.getFsDoctorDropDown().then(response => {
        this.ptdtFsDoctorList = response.data || {}
        const extractedNames = this.ptdtFsDoctorList.map(item => item.doctorName)

        console.log(extractedNames)
        this.ptdtFsDoctorList = extractedNames
        console.log('复审医生')
        console.log(this.ptdtFsDoctorList)
        console.log('复审医生')
      })
    },
    // 改变多选框状态
    handleSelectionChange(val) {
      // console.log('改变多选框状态')
      this.multipleSelection = val
      // 清空 select_list
      this.select_list = []
      val.forEach(element => {
        this.select_list.push(element)
      })
      console.log(this.select_list)
      console.log(this.multipleSelection)
      this.isShow()
    },
    // 改变显示状态
    isShow() {
      // 选中弹出样式
      if (this.multipleSelection.length > 0) {
        // console.log(this.multipleSelection.length)
        this.$refs.edits.style.visibility = 'visible'
      } else {
        this.$refs.edits.style.visibility = 'hidden'
      }
    },
    // 获取显像剂
    getDropDownXxj() {
      teacher.getDropDownXxj().then((response) => {
        this.checkXxjList = response.data || {}
      })
    },
    getCheckName() {
      getDropDownCheckName().then((response) => {
        this.checkNameList = response.data || []
      })
    },
    // 状态下拉框
    getDropDownState() {
      teacher.getDropDownState().then(response => {
        this.ptdtStatusList = response.data
      })
    },
    // 获取院落
    getDropDownBranch() {
      teacher.getDropDownBranch().then(response => {
        this.checkBranchList = response.data || {}
      })
    },
    // 阴阳性改2为null
    change2tonull() {
      console.log(this.PtPatientVo2.ptdtPositiveflag)
      setTimeout(() => {
        if (this.PtPatientVo2.ptdtPositiveflag == 2) {
          this.PtPatientVo2.ptdtPositiveflag = null
          console.log(this.PtPatientVo2.ptdtPositiveflag)
        }
      }, 250)
    },
    // // 状态下拉框
    // getDropDownState() {
    //   teacher.getDropDownState().then(response => {
    //     this.ptdtStatusList = response.data
    //   })
    // },
    openEdit() {
      this.studyInsta2 = this.report.studyInsta
    },
    // 标签页切换触发
    handleNodeClick2(e) {
      console.log(this.ptdeId2);

      switch (this.activeName2) {
        case 'first':
          this.getBgReady2()
          break
        case 'second':
          console.log('second')
          teacher.getAllImgs(this.ptdeId2).then(response => {
            if (typeof response.data === 'number') {
              this.urls = []
              this.allimgnumber = 0
              this.selectimgnumber = 0
            } else {
              this.urls = []

              for (let i = 0; i < response.data.length; i++) {
                console.log(response.data[i]);
                // 显示数据是否获取正常
                // 依照el-image需要的数据格式修改data对象到this.url中
                this.url.completePath = response.data[i].completePath
                this.url.path ='data:image/jpeg;base64,' + response.data[i].imageBase64
                this.url.imageID = response.data[i].imageID
                this.url.imageDescription = response.data[i].imageDescription
                this.url.selected = !response.data[i].number
                // 修改好的对象push进对象数组this.urls中
                this.urls.push(this.url)
                this.url = []
                this.allimgnumber = response.data.length
                this.selectimgnumber1()
              }
            }

          })
                // }

                // 测试用代码
                // for (let i = 0; i < this.csimglist.length; i++) {
                //   // 显示数据是否获取正常
                //   console.log(this.csimglist)
                //   console.log(123)
                //   console.log(this.csimglist[0])

                //   // 依照el-image需要的数据格式修改data对象到this.url中
                //   this.url.completePath = this.csimglist[i].completePath
                //   console.log(789)
                //   this.url.path = 'http://172.20.128.6:8089' + this.csimglist[i].completePath
                //   this.url.selected = !this.csimglist[i].number
                //   // console.log(this.url)
                //   // 修改好的对象push进对象数组this.urls中
                //   this.urls.push(this.url)
                //   this.url = []
                //   this.allimgnumber = this.csimglist.length
                //   this.selectimgnumber1()
                //   console.log(12321)

          break
        case 'third':
          teacher.getTemplate().then((response) => {
            this.data2 = response.data.public
          })
          break
        case 'fourth':
        this.openEdit()
          console.log('four 已触发')
          console.log(this.studyInsta2)
          teacher.getSequence1(this.studyInsta2).then((response) => {
            console.log(response.data)
            this.tableList1 = response.data
          })

          const data = {
            ptdeid: this.ptdeId2,
            nameList: []
          }
          teacher.getSequence3(data).then(response => {
            this.tableList = [response.data]
            console.log(this.tableList)
          })

          break
      }
    },
    // 图像添加高亮
    toggleHighlight(index) {
      this.urls[index].selected = !this.urls[index].selected
      this.selectimgnumber1()
      this.imgchange()
      this.imgchange()
      console.log(this.urls[index])
    },
    selectimgnumber1() {
      this.selectimgnumber = 0
      this.urls.forEach((url) => {
        this.selectimgnumber += url.selected
      })
    },
    // console.log(index)
    // console.log(this.url)
    // select(url) {
    //   // eslint-disable-next-line no-undef
    //   document.getElementsByClassName(elimg).style.border = 'red'
    //   console.log(url)
    //   // if (url.number > 0) {
    //   //   url.number = 0
    //   //   console.log(url.number)
    //   // } else {
    //   //   url.number = 1
    //   //   console.log(url.number)
    //   // }
    // },

    // 大小图像切换
    imgchange() {
      if (this.elimg === 30) {
        this.elimg = 98
        this.imgbs = '大图标'
      } else {
        this.elimg = 30
        this.imgbs = '小图标'
      }
    },
    // 全选图片
    selectAllimg() {
      this.selectAll = !this.selectAll
      this.urls.forEach((url) => {
        url.selected = this.selectAll
      })
      this.selectimgnumber1()
      this.imgchange()
      this.imgchange()
    },
    // 删除图片
    deleteimg() {
      this.urls.forEach((url) => {
        if (url.selected === true) {
          // this.imgchangeTxt= 'http://172.20.128.6:8089/api/tspet/imagesMap?StudyInsta=' +url.path
          this.deleteimgList.push(url.imageID)
        }

      })
      const imageIdList = {
        imageIdList: this.deleteimgList
      }
      teacher.deleteEditImg(imageIdList).then(res => {
          this.deleteimgList = [];
      })
      setTimeout(() => {
        this.handleNodeClick2()
        this.$message.success("删除成功")
      }, 1000)

    },
    // 历史查询
    hisDoSearch(cxvalue, hisSearchvalue) {
      console.log(cxvalue)
      if (cxvalue > 0) {
        // this.hisDoSearch1(cxvalue, hisSearchvalue)
        console.log(cxvalue)
        teacher.getHistorybyname(hisSearchvalue).then((response) => {
          this.hisSearchList = response.data || {}
          this.jwchecked = Object.keys(response.data).length
        })
      } else if (cxvalue < 1) {
        // this.hisDoSearch2(cxvalue, hisSearchvalue)
        console.log(cxvalue)
        teacher.getHistorybycheckid(hisSearchvalue).then((response) => {
          this.hisSearchList = response.data || {}
          this.jwchecked = Object.keys(response.data).length
        })
      } else {
        console.log(5)
      }
    },
    // 名字查询
    hisDoSearch1(cxvalue, hisSearchvalue) {
      console.log(cxvalue)
      teacher.getHistorybyname(hisSearchvalue).then((response) => {
        this.hisSearchList = response.data || {}
      })
    },
    // 检查号查询
    hisDoSearch2(cxvalue, hisSearchvalue) {
      console.log(cxvalue)
      teacher.getHistorybycheckid(hisSearchvalue).then((response) => {
        this.hisSearchList = response.data || {}
      })
    },
    // 仅列与当前检查类型相似的
    jlcheck(jlchecked, hisSearchList) {
      if (jlchecked) {
        this.jlcheckedList = hisSearchList.filter((item) => {
          return item.ptdtCheckName === this.report.ptdtCheckName
        })
        this.jlcheckedLista = this.hisSearchList
        this.hisSearchList = this.jlcheckedList
        this.jwchecked = Object.keys(this.hisSearchList).length
      } else {
        this.hisSearchList = this.jlcheckedLista
        this.jwchecked = Object.keys(this.hisSearchList).length
      }
    },
    // 行被点击赋值报告内容
    handleRowClick(row, column, event) {
      console.log('行被点击了:', row)
      this.HistoryVo2 = row
      this.HistoryVo2.ptdtLcdiagnousTxt = row.ptdtLcdiagnousTxt
      this.HistoryVo2.ptdtBgreadyTxt = row.ptdtBgreadyTxt
      this.HistoryVo2.ptdtChecksjTxt = row.ptdtChecksjTxt
      this.HistoryVo2.ptdtCheckyjTxt = row.ptdtCheckyjTxt
      this.HistoryVo2.studyInsta = row.studyInsta
      teacher.getSequence1(this.HistoryVo2.studyInsta).then(res => {
        console.log(response.data)
        this.tableList3 = response.data
      })
    },
    gethistoryimglist(studyInsta) {
      console.log(1121)
      teacher.getImgs(studyInsta).then((response) => {
        console.log(response.msg)
        console.log(response.data)
        if (typeof response.data === 'number') {
          this.hisurls = []
          // this.allimgnumber = 0
          // this.selectimgnumber = 0
          console.log(1234)
        } else {
          // this.imgs = response.data
          // for (let i = 0; i < 20; i++) {
          //   this.imgs.push(response.data[i])
          // }
          this.hisurls = []

          for (let i = 0; i < response.data.length; i++) {
            // 显示数据是否获取正常
            // console.log(response.data[0])
            // 依照el-image需要的数据格式修改data对象到this.url中
            this.hisurl.completePath = response.data[i].completePath
            this.hisurl.path =
              'http://120.27.23.108:8087' + response.data[i].completePath
            this.hisurl.selected = !response.data[i].number
            // console.log(this.url)
            // 修改好的对象push进对象数组this.urls中
            this.hisurls.push(this.hisurl)
            this.hisurl = []
            // this.allimgnumber = response.data.length
            // this.selectimgnumber1()
          }
        }
        // 展示数组
        console.log(699)
        console.log(this.hisurls)
        console.log(288)
      })
      console.log(2232)
    },
    // 点击节点触发
    getTemplateInfo2(e) {
      if (e.children == null) {
        teacher.getTemplateInfo(e.id, e.pid).then((response) => {
          this.TemplateInfo2 = response.data || {}
          const tempStr1 = this.TemplateInfo2.libCheckSj
          this.report.jcSjTxt = tempStr1
            ? `${this.report.jcSjTxt || ''}${tempStr1}`
            : ''
          const tempStr2 = this.TemplateInfo2.libCheckYj
          this.report.jcYjTxt = tempStr2
            ? `${this.report.jcYjTxt || ''}${tempStr2}`
            : ''
          // this.PtPatientVo2.ptdtCheckSjTxt = this.TemplateInfo2.libCheckSj
          // this.PtPatientVo2.ptdtCheckyjTxt = this.TemplateInfo2.libCheckYj
        })
      }
    },
    getTemplateInfo2a(e) {
      const tempStr1 = this.TemplateInfo2.libCheckSj
      this.report.jcSjTxt = tempStr1
        ? `${this.report.jcSjTxt || ''}${tempStr1}`
        : ''
      // this.PtPatientVo2.ptdtCheckSjTxt = this.TemplateInfo2.libCheckSj
      // this.PtPatientVo2.ptdtCheckyjTxt = this.TemplateInfo2.libCheckYj
    },
    getTemplateInfo2b(e) {
      const tempStr2 = this.TemplateInfo2.libCheckYj
      this.report.jcYjTxt = tempStr2
        ? `${this.report.jcYjTxt || ''}${tempStr2}`
        : ''
      // this.PtPatientVo2.ptdtCheckSjTxt = this.TemplateInfo2.libCheckSj
      // this.PtPatientVo2.ptdtCheckyjTxt = this.TemplateInfo2.libCheckYj
    },
    getTemplateInfo3(e) {
      if (e.children == null) {
        teacher.getTemplateInfo(e.id, e.pid).then((response) => {
          this.TemplateInfo3 = response.data || {}
          const tempStr1 = this.TemplateInfo3.libCheckSj
          this.PtPatientVo3.ptdtCheckSjTxt = tempStr1
            ? `${this.PtPatientVo3.ptdtCheckSjTxt || ''}${tempStr1}`
            : ''
          const tempStr2 = this.TemplateInfo3.libCheckYj
          this.PtPatientVo3.ptdtCheckyjTxt = tempStr2
            ? `${this.PtPatientVo3.ptdtCheckyjTxt || ''}${tempStr2}`
            : ''
          // this.PtPatientVo2.ptdtCheckSjTxt = this.TemplateInfo2.libCheckSj
          // this.PtPatientVo2.ptdtCheckyjTxt = this.TemplateInfo2.libCheckYj
          this.PtPatientVo3.label = e.label
          // this.TemplateInfo3.label = this.PtPatientVo3.label
          this.$set(this.TemplateInfo3, 'label', this.PtPatientVo3.label)
          this.TemplateInfo3.id = e.id
        })
      }
    },
    // 模板添加
    mbappendbox(data) {
      this.$prompt('请输入标题', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消'
      })
        .then(({ value }) => {
          this.mbappend(data, value)
        })
        .catch(() => {
          this.$message({
            type: 'info',
            message: '取消添加'
          })
        })
    },
    mbappend(data, title) {
      console.log(data)
      this.mbappendList.libName = title
      this.mbappendList.libCheckSj = ''
      this.mbappendList.libCheckYj = ''
      this.mbappendList.libParentID = data.id
      console.log(this.mbappendList)
      teacher.mbappend(this.mbappendList).then((response) => {
        this.mbsaveTxt = response.msg || {}
        console.log(this.mbsaveTxt)
        if (this.mbsaveTxt === '保存成功') {
          this.$message({
            message: '添加成功',
            type: 'success'
          })
        } else {
          this.$message.error('添加失败')
        }
      })
      setTimeout(() => {
        this.handleNodeClick2()
      }, 500)
    },
    // 模板删除
    mbremovebox(data) {
      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.mbremove(data)
        })
        .catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
    },
    // id:id++
    mbremove(data) {
      this.convertedData = this.convertData(data)
      console.log(JSON.stringify(this.convertedData, null, 2))
      // console.log(data)
      teacher.mbremove(this.convertedData).then((response) => {
        this.mbsaveTxt = response.msg || {}
        console.log(this.mbsaveTxt)
        if (this.mbsaveTxt === '保存成功') {
          this.$message({
            message: '删除成功',
            type: 'success'
          })
        } else {
          this.$message.error('删除失败')
        }
      })

      setTimeout(() => {
        this.handleNodeClick2()
      }, 500)
    },
    convertData(data) {
      if (data.children && data.children.length > 0) {
        this.convertdata = {
          libID: data.id,
          children: data.children.map((child) => {
            const childObj = {
              id: child.id
            }

            // 如果 child 有 children 属性且其长度大于 0，则递归调用 convertData
            if (child.children && child.children.length > 0) {
              childObj.children = this.convertData(child).children
            }

            // 如果 child 没有 children 属性或者 children 数组为空，则不设置 childObj.children
            // 这样在返回的对象中就不会包含 "children: []"

            return childObj
          })
        }
      } else {
        this.convertdata = {
          libID: data.id
        }
      }

      return this.convertdata
    },
    // 转换函数，将纯文本转换为 RTF 格式
    // convertToRTF(text) {
    //   // 假设我们想要使用默认字体（如宋体）和默认大小（如12号）
    //   const defaultFont = '\\f0\\fs24' // 宋体, 24号字体大小
    //   return `{\\rtf1\\ansi\\deff0\\deflang1033\\par${defaultFont}${text}\\par}`
    // },
    convertToRTF(text) {
      // 默认字体和大小
      const defaultFont = '\\f0\\fs24' // 假设是某种默认字体和大小

      // 将文本中的每个换行符替换为RTF的段落标记，但不在开头和结尾添加额外的\par
      const rtfText = defaultFont + text.replace(/\n/g, '\\par' + defaultFont)

      // 包裹整个文本内容在RTF边界标记中，并添加一个结尾的\par以确保文本格式正确
      const fullRTF = `{\\rtf1\\ansi\\deff0\\deflang1033${rtfText}\\par}`

      // 返回RTF格式的文本
      return fullRTF
    },

    // mbsave 函数
    mbsave(id, label, libCheckSj, libCheckYj) {
      console.log(id, label, libCheckSj, libCheckYj)

      // 将 libCheckSj 和 libCheckYj 转换为 RTF 格式
      const rtfLibCheckSj = this.convertToRTF(libCheckSj)
      const rtfLibCheckYj = this.convertToRTF(libCheckYj)

      // 创建 mbsaveList，包含 RTF 格式的数据
      const mbsaveList = {
        libID: id,
        libCheckSj: rtfLibCheckSj,
        libCheckYj: rtfLibCheckYj,
        libName: label // 假设 libName 不需要转换为 RTF 格式
      }

      console.log(mbsaveList)

      // 发送 mbsaveList 到 teacher.mbsave 方法
      teacher.mbsave(mbsaveList).then((response) => {
        this.mbsaveTxt = response.msg || {}
        console.log(this.mbsaveTxt)
        if (this.mbsaveTxt === '保存成功') {
          this.$message({
            message: '保存成功',
            type: 'success'
          })
        } else {
          this.$message.error('保存失败')
        }
      })

      // 延迟调用 handleNodeClick2 方法
      setTimeout(() => {
        this.handleNodeClick2()
      }, 500)
    },
    // 改变院落
    changeBranch() {
      const qtchangeList = {
        ptdeId: this.report.ptdeId,
        ptdtBranch: this.qtptdtBranch
      }
      console.log(qtchangeList)
      teacher.changeBranch(qtchangeList).then(response => {
        this.qtchangetxt = response.data || {}
      })
      console.log(this.qtptdtBranch)
    },
    // 报告医生审核医生复审医生切换
    checkDoctor() {
      if (this.checkingStatusItems[0].statuscn == '待报告' && this.$store.state.user.infos.roles.filter(item => item === 'reportDoctor') == 'reportDoctor') {
        this.shouldShowDemo1 = true
        this.shouldShowDemo2 = true
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = true
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = false
      } else if (this.checkingStatusItems[0].statuscn == '报告中' && this.$store.state.user.infos.roles.filter(item => item === 'reportDoctor') == 'reportDoctor') {
        this.shouldShowDemo1 = true
        this.shouldShowDemo2 = true
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = true
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = false
      } else if (this.checkingStatusItems[0].statuscn == '待审核' && this.$store.state.user.infos.roles.filter(item => item === 'reviewDoctor') == 'reviewDoctor') {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = true
        this.shouldShowDemo6 = true
        this.shouldShowDemo7 = true
        this.shouldShowDemo8 = true
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = true
        this.shouldShowDemo13 = false
      } else if (this.checkingStatusItems[0].statuscn == '审核中' && this.$store.state.user.infos.roles.filter(item => item === 'reviewDoctor') == 'reviewDoctor') {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = true
        this.shouldShowDemo6 = true
        this.shouldShowDemo7 = true
        this.shouldShowDemo8 = true
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = true
        this.shouldShowDemo13 = false
      } else if (this.checkingStatusItems[0].statuscn == '待复审' && this.$store.state.user.infos.roles.filter(item => item === 'reexamineDoctor') == 'reexamineDoctor') {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = true
        this.shouldShowDemo10 = true
        this.shouldShowDemo11 = true
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = true
      } else if (this.checkingStatusItems[0].statuscn == '复审中' && this.$store.state.user.infos.roles.filter(item => item === 'reexamineDoctor') == 'reexamineDoctor') {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = true
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = true
        this.shouldShowDemo10 = true
        this.shouldShowDemo11 = true
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = true
      } else {
        this.shouldShowDemo1 = false
        this.shouldShowDemo2 = false
        // this.shouldShowDemo3 = false
        // this.shouldShowDemo30 = false
        this.shouldShowDemo4 = false
        this.shouldShowDemo5 = false
        this.shouldShowDemo6 = false
        this.shouldShowDemo7 = false
        this.shouldShowDemo8 = false
        this.shouldShowDemo9 = false
        this.shouldShowDemo10 = false
        this.shouldShowDemo11 = false
        this.shouldShowDemo12 = false
        this.shouldShowDemo13 = false
      }
    },
    // 富文本编辑器被选中
    onEditorFocus($event) {
      console.log(123123123)
      console.log($event)
      console.log(123456789)
      switch (this.checkingStatusItems[0].statuscn) {
        case '待报告':
          if (this.$store.state.user.infos.roles.filter(item => item === 'reportDoctor') == 'reportDoctor') {
            this.reportExtract(this.report.ptdeId)
          }
          break
        case '待审核':
          if (this.$store.state.user.infos.roles.filter(item => item === 'reviewDoctor') == 'reviewDoctor') {
            this.reviewExtract(this.report.ptdeId)
          }
          break
        case '待复审':
          if (this.$store.state.user.infos.roles.filter(item => item === 'reexamineDoctor') == 'reexamineDoctor') {
            this.reexamineExtract(this.report.ptdeId)
          }
          break
      }
    },

    // 提取医生及时间获取
    // async getDoctorAndTime() {
    //   const reportId = String(this.studentText.reportId)
    //   const data = await studentReportInfo(reportId)
    //   console.log('提取医生及时间获取')
    //   console.log(data)
    //   console.log('提取医生及时间获取')
    //   this.DoctorAndTime = [{
    //     status: '',
    //     doctor: '',
    //     time: ''
    //   },
    //   {
    //     status: '',
    //     doctor: '',
    //     time: ''
    //   },
    //   {
    //     status: '',
    //     doctor: '',
    //     time: ''
    //   }]
    //   if ((data.ptdtBgdoctor != null) && (data.ptdtReportdate != null) && (data.ptdtBgdoctor != '')) {
    //     this.DoctorAndTime[0].status = '【报告】'
    //     this.DoctorAndTime[0].doctor = data.ptdtBgdoctor
    //     this.DoctorAndTime[0].time = data.ptdtReportdate
    //     if ((data.ptdtShdoctor != null) && (data.ptdtShdate != null) && (data.ptdtShdoctor != '')) {
    //       this.DoctorAndTime[1].status = '【审核】'
    //       this.DoctorAndTime[1].doctor = data.ptdtShdoctor
    //       this.DoctorAndTime[1].time = data.ptdtShdate
    //       if ((data.ptdtShdoctor2 != null) && (data.ptdtShdate2 != null) && (data.ptdtShdoctor2 != '')) {
    //         this.DoctorAndTime[2].status = '【复审】'
    //         this.DoctorAndTime[2].doctor = data.ptdtShdoctor2
    //         this.DoctorAndTime[2].time = data.ptdtShdate2
    //       }
    //     }
    //   }
    //   console.log(this.DoctorAndTime)
    //   // const ptdeId1 = String(ptdeId)
    //   // teacher.getDoctorAndTime(ptdeId1).then(response => {
    //   //   const data = response || {}

    //   // })
    // },
    // async getDoctorAndTime1(ptdeId) {
    //   const ptdeId1 = String(ptdeId)
    //   console.log(ptdeId)
    //   console.log('提取医生及时间获取1')
    //   teacher.getDoctorAndTime(ptdeId1).then(response => {
    //     debugger
    //     console.log('提取医生及时间获取2')
    //     const data = response || {}
    //     console.log(data)
    //     alert(JSON.stringify(data))
    //     console.log(data)
    //   }).catch(error => {
    //     console.error('获取医生及时间出错:', error)
    //   })
    //   console.log('提取医生及时间获取3')
    // },
    // getDoctorAndTime2(ptdeId) {
    //   const ptdeId1 = String(ptdeId)
    //   console.log(ptdeId)
    //   console.log('提取医生及时间获取1')
    //   // eslint-disable-next-line no-undef
    //   // const data = await getDoctorAndTime1(ptdeId1)
    //   // console.log(data)
    //   teacher.getDoctorAndTime(ptdeId1).then(response => {
    //     console.log('提取医生及时间获取2')
    //     const data = response || {}
    //     alert(JSON.stringify(data))
    //     console.log(data)
    //   }).catch(error => {
    //     console.error('获取医生及时间出错:', error)
    //   })
    //   console.log('提取医生及时间获取3')
    //   // teacher.getDoctorAndTime(ptdeId1).then(response => {
    //   //   const data = response || {}
    //   //   console.log('提取医生及时间获取')
    //   //   console.log(data)
    //   //   console.log('提取医生及时间获取')
    //   //   this.qtptdtStatus = data.ptdtStatus
    //   //   this.checkingStatusItems = this.ptdtStatusList.filter(item => item.status === this.qtptdtStatus)
    //   //   console.log('测试3')
    //   //   console.log(this.checkingStatusItems)
    //   //   console.log('测试3')
    //   //   this.DoctorAndTime = [{
    //   //     status: '',
    //   //     doctor: '',
    //   //     time: ''
    //   //   },
    //   //   {
    //   //     status: '',
    //   //     doctor: '',
    //   //     time: ''
    //   //   },
    //   //   {
    //   //     status: '',
    //   //     doctor: '',
    //   //     time: ''
    //   //   }]
    //   //   if ((data.ptdtBgdoctor != null) && (data.ptdtReportdate != null) && (data.ptdtBgdoctor != '')) {
    //   //     this.DoctorAndTime[0].status = '【报告】'
    //   //     this.DoctorAndTime[0].doctor = data.ptdtBgdoctor
    //   //     this.DoctorAndTime[0].time = data.ptdtReportdate
    //   //     if ((data.ptdtShdoctor != null) && (data.ptdtShdate != null) && (data.ptdtShdoctor != '')) {
    //   //       this.DoctorAndTime[1].status = '【审核】'
    //   //       this.DoctorAndTime[1].doctor = data.ptdtShdoctor
    //   //       this.DoctorAndTime[1].time = data.ptdtShdate
    //   //       if ((data.ptdtShdoctor2 != null) && (data.ptdtShdate2 != null) && (data.ptdtShdoctor2 != '')) {
    //   //         this.DoctorAndTime[2].status = '【复审】'
    //   //         this.DoctorAndTime[2].doctor = data.ptdtShdoctor2
    //   //         this.DoctorAndTime[2].time = data.ptdtShdate2
    //   //       }
    //   //     }
    //   //   }
    //   //   console.log('11')
    //   //   console.log(this.DoctorAndTime)
    //   //   console.log('22')
    //   // })
    // },
    // 按钮成功反馈
    successFeedback(msg) {
      this.$message({
        message: msg,
        type: 'success'
      })
    },
    // 按钮是否展示
    buttonShowOrNot() {
      if (this.checkingStatusItems[0].statuscn == '待审核' && this.qtptdtBgDoctor == this.$store.state.user.name) {
        this.shouldShowDemo3 = false
        this.shouldShowDemo30 = true
        console.log('退回审核')
      } else if (this.checkingStatusItems[0].statuscn == '待复审' && this.qtptdtShDoctor == this.$store.state.user.name) {
        this.shouldShowDemo3 = false
        this.shouldShowDemo30 = true
        console.log('退回复审')
      } else if (this.checkingStatusItems[0].statuscn != '待报告' && this.checkingStatusItems[0].statuscn != '报告中' && this.checkingStatusItems[0].statuscn != '待审核' && this.checkingStatusItems[0].statuscn != '审核中' && this.checkingStatusItems[0].statuscn != '待复审' && this.checkingStatusItems[0].statuscn != '复审中') {
        this.shouldShowDemo3 = false
        this.shouldShowDemo30 = false
      } else {
        this.shouldShowDemo3 = true
        this.shouldShowDemo30 = false
      }
    },
    // 按钮是否禁用
    buttonDisabled() {
      // 报告阶段判断
      // if (this.$store.state.user.roles.filter(item => item === 'reportDoctor') == 'reportDoctor') {
      if (this.checkingStatusItems[0].statuscn == '待报告') {
        this.shouldDisabled1 = true
        this.shouldDisabled2 = false
        this.shouldDisabled3 = false
        this.shouldDisabled4 = false
        this.shouldDisabled5 = false
        this.shouldDisabled6 = false
        this.shouldDisabled7 = false
        this.shouldDisabled8 = false
        this.shouldDisabled9 = false
        this.shouldDisabled10 = false
        this.shouldDisabled11 = false
        this.shouldDisabled12 = false
        this.shouldDisabled13 = false
        this.shouldDisabled14 = false
        console.log('按钮是否禁用2')
      } else if (this.checkingStatusItems[0].statuscn == '报告中') {
        if (this.$store.state.user.name != this.qtptdtBgDoctor) {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = false
          this.shouldDisabled12 = false
          this.shouldDisabled13 = false
          this.shouldDisabled14 = false
        } else {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = true
          this.shouldDisabled3 = true
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = true
          this.shouldDisabled12 = true
          this.shouldDisabled13 = false
          this.shouldDisabled14 = false
          // this.buttonDisabledAssist(0)
        }
      }
      // }

      // 审核阶段判断
      // if (this.$store.state.user.roles.filter(item => item === 'reviewDoctor') == 'reviewDoctor') {
      if (this.checkingStatusItems[0].statuscn == '待审核') {
        this.shouldDisabled1 = false
        this.shouldDisabled2 = false
        this.shouldDisabled3 = false
        this.shouldDisabled4 = true
        this.shouldDisabled5 = false
        this.shouldDisabled6 = false
        this.shouldDisabled7 = false
        this.shouldDisabled8 = false
        this.shouldDisabled9 = false
        this.shouldDisabled10 = false
        this.shouldDisabled11 = false
        this.shouldDisabled12 = true
        this.shouldDisabled13 = false
        this.shouldDisabled14 = false

      } else if (this.checkingStatusItems[0].statuscn == '审核中') {
        if (this.$store.state.user.name != this.qtptdtShDoctor) {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = false
          this.shouldDisabled12 = false
          this.shouldDisabled13 = false
          this.shouldDisabled14 = false
          console.log('按钮是否禁用50')
        } else {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = true
          this.shouldDisabled6 = true
          this.shouldDisabled7 = true
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = true
          this.shouldDisabled12 = true
          this.shouldDisabled13 = true
          this.shouldDisabled14 = false
          // this.buttonDisabledAssist(1)
        }
      }
      // }

      // 复审阶段判断
      // if (this.$store.state.user.roles.filter(item => item === 'reexamineDoctor') == 'reexamineDoctor') {
      if (this.checkingStatusItems[0].statuscn == '待复审') {
        this.shouldDisabled1 = false
        this.shouldDisabled2 = false
        this.shouldDisabled3 = false
        this.shouldDisabled4 = false
        this.shouldDisabled5 = false
        this.shouldDisabled6 = false
        this.shouldDisabled7 = false
        this.shouldDisabled8 = true
        this.shouldDisabled9 = false
        this.shouldDisabled10 = false
        this.shouldDisabled11 = false
        this.shouldDisabled12 = true
        this.shouldDisabled13 = false
        this.shouldDisabled14 = false
      } else if (this.checkingStatusItems[0].statuscn == '复审中') {
        if (this.$store.state.user.name != this.qtptdtShDoctor2) {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = false
          this.shouldDisabled10 = false
          this.shouldDisabled11 = false
          this.shouldDisabled12 = false
          this.shouldDisabled13 = false
          this.shouldDisabled14 = false
          console.log('按钮是否禁用70')
        } else {
          this.shouldDisabled1 = false
          this.shouldDisabled2 = false
          this.shouldDisabled3 = false
          this.shouldDisabled4 = false
          this.shouldDisabled5 = false
          this.shouldDisabled6 = false
          this.shouldDisabled7 = false
          this.shouldDisabled8 = false
          this.shouldDisabled9 = true
          this.shouldDisabled10 = true
          this.shouldDisabled11 = true
          this.shouldDisabled12 = true
          this.shouldDisabled13 = false
          this.shouldDisabled14 = true
          // this.buttonDisabledAssist(2)
          console.log('按钮是否禁用7')
        }
      }
      // }
    },

    // 报告提取
    reportExtract(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      console.log(data)
      teacher.reportExtract(data).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      console.log(jsonString)

      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 撤销提取
    revokeExtraction(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.revokeExtraction(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 退回审核/复审
    revokeDoctor() {
      if (this.checkingStatusItems[0].statuscn == '待审核') {
        this.revoke(1)
      } else if (this.checkingStatusItems[0].statuscn == '待复审') {
        this.revoke(2)
      }
    },
    // 撤回
    async revoke(backnumber) {
      switch (backnumber) {
        case 0:
          console.log(0)
          const txt = await studentReportInfo(this.report.reportId)
          // const txt = response.data || {}
          console.log('调取')
          console.log(txt)
          // console.log(this.qtptdtShDoctor)
          console.log('调取')
          this.report.jcProReadyTxt = txt.data.jcProReadyTxt
          this.report.jcSjTxt = txt.data.jcSjTxt
          this.report.jcYjTxt = txt.data.jcYjTxt
          this.qtptdtStatus = txt.data.ptdtStatus
          this.qtptdtBgDoctor = txt.data.ptdtBgDoctor
          this.qtptdtShDoctor = txt.data.ptdtShdoctor
          this.qtptdtShDoctor2 = txt.data.ptdtShdoctor2
          this.checkingStatusItems = this.ptdtStatusList.filter(item => item.status === this.qtptdtStatus)

          // this.getList()
          // this.getDoctorAndTime(this.PtPatientVo2.ptdeId)
          this.getList(this.searchForm)
          this.buttonDisabled()
          break
        case 1:
          console.log(1)
          if (this.checkingStatusItems[0].statuscn == '待审核') {
            console.log(888)
            var userName1 = this.$store.state.user.name
            const data = {
              id: this.report.ptdeId,
              name: userName1
            }
            const jsonString = JSON.stringify(data)
            teacher.backCommited(jsonString).then(response => {
              const txt = response.data || {}
              console.log(txt)
              if (response.code == 200) {
                this.successFeedback(response.msg)
              }
            })
          } else {
            console.log(123)
          }
          this.backnumber = 0
          setTimeout(() => {
            this.revoke(0)
          }, 100)
          this.shouldShowDemo3 = true
          this.shouldShowDemo30 = false
          break
        case 2:
          console.log(2)
          if (this.checkingStatusItems[0].statuscn == '待复审') {
            console.log(888)
            var userName1 = this.$store.state.user.name
            const data = {
              id: this.report.ptdeId,
              name: userName1
            }
            const jsonString = JSON.stringify(data)
            teacher.backCommited2(jsonString).then(response => {
              const txt = response.data || {}
              console.log(txt)
              if (response.code == 200) {
                this.successFeedback(response.msg)
              }
            })
          } else {
            console.log(123)
          }
          this.backnumber = 0
          setTimeout(() => {
            this.revoke(0)
          }, 100)
          this.shouldShowDemo3 = true
          this.shouldShowDemo30 = false
          break
      }
      teacher.revoke(data).then(response => {
        const txt = response.data || {}
        console.log(txt)
      })
    },
    // 提交审核
    submitExamine(ptdeId) {
      this.studentText.jcProReadyTxt = this.report.jcProReadyTxt
      this.studentText.jcReadyTxt = this.report.jcReadyTxt
      this.studentText.jcSjTxt = this.report.jcSjTxt
      this.studentText.jcYjTxt = this.report.jcYjTxt
      this.subReportData(this.studentText)
      this.$router.push({
        path: '/report/report',
        query: { reportId: this.report.reportId }
      })

      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.submitExamine(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      this.backnumber = 1
      this.shouldShowDemo30 = true
      this.shouldShowDemo3 = false
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 审核提取
    reviewExtract(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.reviewExtract(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 撤销审核
    revokeReview(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.revokeReview(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 审核通过
    reviewApprove(ptdeId) {
      teacher.updatePatient(this.PtPatientVo2)
        .then(response => {
          this.$message({
            type: 'success',
            message: '保存成功!'
          })
          this.editDialogVisible = false
          this.getList()
        })
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.reviewApprove(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 提交复审
    submitReexamine(ptdeId) {
      this.studentText.jcProReadyTxt = this.report.jcProReadyTxt
      this.studentText.jcReadyTxt = this.report.jcReadyTxt
      this.studentText.jcSjTxt = this.report.jcSjTxt
      this.studentText.jcYjTxt = this.report.jcYjTxt
      this.subReportData(this.studentText)
      this.$router.push({
        path: '/report/report',
        query: { reportId: this.report.reportId }
      })

      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.submitReexamine(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      this.backnumber = 2
      setTimeout(() => {
        this.revoke(0)
      }, 100)
      this.shouldShowDemo30 = true
      this.shouldShowDemo3 = false
    },
    // 复审提取
    reexamineExtract(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.reexamineExtract(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 撤销复审
    revokeReexamine(ptdeId) {
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.revokeReexamine(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 复审通过
    reexamineApprove(ptdeId) {
      teacher.updatePatient(this.PtPatientVo2)
        .then(response => {
          this.$message({
            type: 'success',
            message: '保存成功!'
          })
          this.editDialogVisible = false
          this.getList()
        })
      var userName1 = this.$store.state.user.name
      const data = {
        id: ptdeId,
        name: userName1
      }
      const jsonString = JSON.stringify(data)
      teacher.reexamineApprove(jsonString).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 转审审核医生
    changeReviewer1(name) {
      var userName1 = this.$store.state.user.name
      console.log(name)
      console.log(userName1)
      const data = {
        id: this.report.ptdeId,
        name: userName1,
        zsshname: name
      }
      console.log(data)
      teacher.changeReviewer1(data).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    // 转审复审医生
    changeReviewer2(name) {
      var userName1 = this.$store.state.user.name
      console.log(name)
      console.log(userName1)
      const data = {
        id: this.report.ptdeId,
        name: userName1,
        zsshname2: name
      }
      console.log(data)
      teacher.changeReviewer2(data).then(response => {
        const txt = response.data || {}
        console.log(txt)
        if (response.code == 200) {
          this.successFeedback(response.msg)
        }
      })
      setTimeout(() => {
        this.revoke(0)
      }, 100)
    },
    cns() {
      console.log(1231231)
      console.log(this.editableTabs)
      console.log(1111111)
    }
  }
}
</script>
<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
}
.app-container {
  height: calc(100vh - 60px);
  box-sizing: border-box;
  overflow-y: auto;
  padding: 30px;
  // background: url('../../assets/shebei_images/BMD.jpg') center center no-repeat;
  width: 100%;
  background-size: 100% 100% !important;

  .el-form {
    align-items: center;
    justify-content: space-between;
  }

  .tabs-container {
    background-color: rgba(0, 0, 0, 0);
  }

  // 搜索表单
  .searchForm {
    display: flex;
    justify-content: left;
    flex-direction: row;
    flex-wrap: wrap;
    // margin-bottom: 10px;

    // 搜索组
    .item-group {
      // display: block;
      width: 170px;
      padding: 0px 5px;

      .el-form-item {
        margin-bottom: 5px;
      }

      .item-title {
        widows: 90px;
        display: flex;
      }
      .el-checkbox {
        color: black;
      }
      .el-select {
        width: 140px;
      }
      span {
        font-size: 15px;
        margin-right: 7px;
        // margin-left: -35px;
      }
      .radio2-box {
        display: flex;
        flex-direction: column;
        height: 120px;
        .el-radio {
          height: 25px;
        }
      }
      .el-button {
        width: 120px;
        background-color: rgb(226, 238, 252);
        border: 1px solid #606266;
        margin-left: 10px;
      }
    }
    .six {
      height: 120px;
      width: 110px;
    }

    .S {
      width: 220px;
      .radio1-box {
        height: 0px;
      }
      .S-box {
        width: 220px;
        margin-bottom: 7px;
        margin-top: -25px;
      }
    }
    .J {
      // display: flex;
      // flex-direction: column;
      // justify-self: start;
      width: 150px;
      .el-input {
        .el-input__icon {
          line-height: 0px;
        }
        .backgroundcolor .el-input__inner {
          background-color: #409eff;
        }
      }
      ::v-deep .el-input__inner {
        height: 30px !important;
        margin-bottom: 5px;
      }
    }
    .g2 {
      width: 222px;

      ::v-deep input {
        text-align: center;
        width: 150px;
      }
      .el-button {
        width: 150px;
        margin-left: 80px;
        background-color: rgb(226, 238, 252);
        border: 1px solid #606266;
      }
    }

    // 覆盖el-form

    ::v-deep .el-form-item__label,
    ::v-deep .el-radio__label {
      font-weight: normal;
      font-size: 14px;
      line-height: 30px;
      padding: 0px 5px 0px;
      margin: 0;
    }
    ::v-deep .el-input__prefix {
      left: 110px;
    }
  }
  .el-tag {
    color: black;
    background-color: rgb(126, 128, 1) !important;
    border-radius: 0px !important;
    height: 100%;
  }
  //天数选择
  .el-input__inner {
    width: 100px;
  }
  .el-radio {
    margin: 2px 0px 1px 5px;
    color: black;
  }
  .el-radio-group {
    height: 105px;
    margin-left: 10px;
  }
  //日期选择
  .el-date-editor {
    width: 140px;
  }
  .el-input__inner {
    height: 20px;
  }
  .el-input__icon:after {
    content: none !important;
  }
  .block {
    .el-select {
      width: 140px;
      .el-input__inner {
        margin-left: 10px;
      }
    }
  }
  // 覆盖el-table
  ::v-deep .el-table__cell {
    padding: 0px;
  }
  //分页器

  .pagination {
    // height: 50px;
    display: flex;
    margin-top: 0px;
    margin-bottom: 0px;
    width: 100%;
    background-color: rgb(209, 224, 243);
    .el-button {
      height: 40px;
      width: 100px;
      background-color: rgb(226, 238, 254);
      color: black;
      border: 1px solid rgb(180, 197, 217);
    }
    span {
      width: 40px;
    }
  }
  //表头颜色
  .has-gutter {
    .el-table__cell {
      background-color: #409eff;
    }
  }
  // 数据列表
  .reportList {
    padding: 0px 10px;
    .el-icon-printer {
      width: 20px;
      height: 20px;
    }
  }

  .edit-btn,
  .overview,
  .contrast {
    display: inline-block;
    padding: 0px 10px;

    cursor: pointer;

    &:hover {
      text-decoration: underline;
    }
  }

  .edit-btn,
  .contrast {
    color: #409eff;
  }

  .overview {
    color: #909399;
  }

  // 覆盖el-drawer样式
  ::v-deep .el-drawer {
    max-width: 650px;

    .el-drawer__header {
      padding-bottom: 20px;
      margin: 0px;
      box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px;
    }

    .el-drawer__body {
      padding-bottom: 15px;
      background-color: #fafafa;
    }
  }

  // 详情信息
  .info-card {
    // background-color: red;
    padding: 15px;
    margin: 15px 15px 0px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px;

    .card-title {
      position: relative;
      height: 16px;
      color: #409eff;
      line-height: 16px;
      padding-left: 12px;
      margin-bottom: 15px;

      &::before {
        content: '';
        display: inline-block;
        position: absolute;
        left: 0px;
        width: 6px;
        height: 16px;
        background-color: #409eff;
      }
    }

    .card-content {
      font-size: 14px;
      line-height: 20px;
      color: #606266;
      white-space: pre-wrap;
      white-space: -moz-pre-wrap;
      white-space: -pre-wrap;
      white-space: -o-pre-wrap;
      *word-wrap: break-word;
      *white-space: normal;
    }
  }
}

.contentTitle {
  display: flex;

  .two {
    flex: 1;
  }
}

.box {
  display: flex;
}

.date {
  margin-top: 10px;
}

.record {
  display: flex;
}

// ::v-deep .el-select.el-select--mini{
//   width: 200px;
//   input{
//     text-align: center;
//   }
// }
// ::v-deep .el-table_1_column_7>.cell{
//   color: red;
// }
.equipment {
  // margin-bottom: 10px;
  // padding-left: 20px;
  // border-radius: 15px;
  background: rgb(226, 238, 252);
  // box-shadow: 7px 7px 15px #bebebe, -7px -7px 15px #ffffff;
}

.el-loading-mask {
  background-color: rgba(0, 0, 0, 0);
}

//病史检查
.Imageprocessing {
  display: flex;
  height: 300px;
  // justify-content: space-between;
  background-color: rgb(226, 238, 252);
  .history-left {
    height: 100%;
    width: 250px;
  }
  .history-right {
    display: flex;
    flex-direction: column;
    height: 350px;
    width: 100%;
    background-color: rgb(210, 226, 251);

    .history-right-top {
      height: 200px;
      width: 100%;
      background-color: rgb(210, 226, 251);

      .left-top {
        height: 100%;
        width: 49.8%;
        margin-bottom: 1px;
        background-color: white;
        border: 1px solid rgb(173, 189, 205);

        div {
          width: 100%;
          background-color: rgb(199, 209, 221);
        }
        .left-top-bottom {
          // height: 100%;
          width: 100%;
          background-color: white;
        }
      }
      .left-bottom {
        height: 200px;
        width: 99.5%;
        margin-bottom: 1px;
        background-color: white;
        border: 1px solid rgb(173, 189, 205);
        div {
          width: 100%;
          background-color: rgb(199, 209, 221);
        }
        .left-bottom-bottom {
          width: 100%;
          background-color: white;
        }
      }
    }
    .history-right-bottom {
      height: 200px;
      width: 100%;
      background-color: rgb(210, 226, 251);
      .right-top {
        height: 50%;
        width: 100%;
        margin-bottom: 1px;
        background-color: white;
        border: 1px solid rgb(173, 189, 205);

        div {
          width: 100%;
          background-color: rgb(199, 209, 221);
        }
        .right-top-bottom {
          // height: 87%;
          width: 100%;
          background-color: white;
        }
      }
      .bottom-left,
      .bottom-right {
        float: left;
        height: 100%;
        width: 49.8%;
        margin-bottom: 1px;
        background-color: white;
        border: 1px solid rgb(173, 189, 205);
        div {
          width: 100%;
          background-color: rgb(199, 209, 221);
        }
        .right-bottom-bottom {
          // height: 87%;
          width: 100%;
          background-color: white;
        }
        .bottom-left-bottom {
          // height: 87%;
          width: 100%;
          background-color: white;
        }
      }
    }
  }
}
.sbutton {
  background-color: #e3eefd;
  color: #85a1cb;
  height: 28.5px;
  width: 48px;
  border: none;
}

.tab1-content {
  display: none;
  border-top: 1px solid #85a1cb; /* 使上边框不显现 */
  border: none;
}
.tab1-content.active {
  display: block;
}
.tabs1 button.active {
  background-color: #e9f1fb;
  color: black;
  border: 0.1px solid #85a1cb;
  border-radius: 5px;
  border-bottom: none;
  margin-bottom: -1px; /* 使底部边框不显现 */
}
.sbutton1 {
  margin-top: 3px;
  background-color: #e3eefd;
  color: #85a1cb;
  height: 24px;
  width: 63px;
  border: none;
  font-size: small;
}

.otherlisth {
  height: 100%;
  float: left;
  background-color: #e3eefd;
  margin-left: 30px;
}
.otherlist1 {
  display: none;
}
.otherlist {
  display: block;
  font-size: small;
  text-align: center;
  height: 22px;
}
.otherlist:hover {
  background-color: #fbd659;
}
.otherlisth:hover .otherlist1 {
  display: block;
}

.el-tabs__header {
  margin: 0;
}
.el-dropdown-link {
  cursor: pointer;
  color: black;
}
.el-icon-arrow-down {
  font-size: 12px;
}
.el-tabs--border-card > .el-tabs__content {
  padding: 0px;
  padding-left: 2px;
  padding-right: 2px;
}
/* .app-wrapper.hideSidebar{
  background-color: #e3eefd;
}
.app-container{
  background-color: #e3eefd;
} */
.el-tabs__content {
  background-color: #e3eefd;
  padding: 0px;
  padding-left: 2px;
  padding-right: 2px;
}
.el-input--medium .el-input__inner {
  height: 28.5px;
  line-height: 36px;
}
.image-container {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.image-container img {
  width: 30%;
  margin: 5px;
}

.selected1 {
  border: 2px solid red;
}
.ql-editor {
  height: 54px;
  overflow-y: hidden;
}
#el-input__inner1 {
  float: left;

  border: 0.1px solid;
  width: 85px;
  height: 21px;
}
#checksb {
  height: 27px;
}
#checkxm {
  height: 27px;
}
.el-tabs--border-card > .el-tabs__content {
  padding-right: 2px;
  padding-left: 2px;
}
.highlight {
  border: 2px solid red; /* 根据需要自定义高亮样式 */
}

//覆盖input样式
::v-deep .el-input__inner {
  height: 27px;
}
::v-deep .el-input__icon {
  line-height: 0px;
}
::v-deep .el-input__inner {
  line-height: 0px;
}

::v-deep .el-tabs__item:first-child {
    border: 1px solid #dcdfe6 !important;
    margin: 0px 5px;
    padding: 0px 14px !important;
    font-size: 14px;
    font-weight: 500;
}
::v-deep .el-tabs__header, .app-container .el-tabs__nav {
    border: 0px !important;
    padding-bottom: 0;
}
::v-deep .el-dialog__body {
    padding: 30px 20px;
    color: #606266;
    font-size: 14px;
    word-break: break-all;
    background-color: #f5f7fa;
}
::v-deep .el-dialog__header {
    padding: 20px 20px 10px;
    background-color: #e6f5ff;
}
::v-deep .el-tabs--border-card>.el-tabs__content {
    padding: 1px;
}
/*拖拽区div样式*/
.resize {
    cursor: col-resize;
    float: left;
    position: relative;
    top: 45%;
    background-color: gray;
    border-radius: 5px;
    margin-top: -10px;
    width: 10px;
    height: 50px;
    background-size: cover;
    background-position: center;
    z-index: 99999;
    font-size: 32px;
    color: white;
  }

  /*拖拽区鼠标悬停样式*/
  .resize:hover {
    color: #444444;
  }

  .box {
    width: 800px;
    height: 100%;
    margin: 1% 0px;
    overflow: hidden;
    box-shadow: -1px 9px 10px 3px rgba(0, 0, 0, 0.11);
  }

  .select {
    width: 150px;
    margin: 0 10px;
  }

  .table-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    height: 60px;
  }

  .container-parent {
    width: 100%;
    //background-color: red;
    height: 850px;
    overflow: hidden;
    //padding-right: 10%;
  //position: absolute;
  }

  .container-parent-left {
  width: calc(100% - 30%);  /*左侧初始化宽度*/
    height: 100%;
    //background: green;
    float: left;
  }

  /*拖拽区div样式*/
  .resize {
    cursor: col-resize;
    float: left;
    position: relative;
    top: 50%;
    background-color: #d6d6d6;
    border-radius: 5px;
    margin-top: -10px;
    width: 10px;
    height: 50px;
    background-size: cover;
    background-position: center;
    /*z-index: 99999;*/
    font-size: 32px;
    color: white;
  }

  /*拖拽区鼠标悬停样式*/
  .resize:hover {
    color: #444444;
  }

  .container-parent-right {
    float: left;
    width: 29%; /*右侧初始化宽度*/
    //height: 100%;
    background: #fff;
    box-shadow: -1px 4px 5px 3px rgba(0, 0, 0, 0.11);
  }
  /* ::v-deep .el-button--medium1{
    padding:10px 20px
  } */

// 富文本编辑器
::v-deep .ql-toolbar {
  position: relative;
  top: -22px;
  z-index: 1;
}
::v-deep .ql-container{
  position: relative;
  top: -22px;
  overflow: auto;
}

/* 富文本编辑器 */
::v-deep .ql-toolbar.ql-snow .ql-formats{
  margin-right: 0px;
}
::v-deep .ql-snow.ql-toolbar button, .ql-snow .ql-toolbar button {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    float: left;
    height: 24px;
    padding: 3px 5px;
    width: 21px;
}

.resize1 {
    width: 50px;
    height: 10px;
    position: relative;
    background-position: center;
    border-radius: 5px;
    cursor: row-resize;
    left: 45%;
    background-color: #d6d6d6;
    font-size: 20px;
    color: white;
    padding-left: 10px;
    padding-bottom: 20px;
  }

  .resize1:hover {
    color: #444444;
  }

  .container-parent1 {
    height: 100vh;
  }

  .resize2 {
  cursor: col-resize;
  float: left;
  position: relative;
  top: 15%;
  background-color: #d6d6d6;
  border-radius: 5px;
  margin-top: -10px;
  width: 10px;
  height: 50px;
  background-size: cover;
  background-position: center;
  /*z-index: 99999;*/
  font-size: 32px;
  color: white;
}

.resize2:hover {
  color: #444444;
}

::v-deep .el-card__body, .el-main {
    padding: 2px;
}
.el-dropdown [disabled] {
    cursor: not-allowed;
    color: #bbb;
}

.el-descriptions{
  height: 18.2px;
}

.button-container {
    display: flex;
    gap: 12px; /* 增加按钮之间的间距 */
    margin-top: 16px; /* 增加顶部间距 */
  }

  .action-button {
    padding: 8px 16px; /* 调整按钮内边距 */
    border-radius: 4px; /* 圆角按钮 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影 */
  }

  .content-container {
    border: 1px solid #c4d9f3; /* 使用较宽的边框 */
    border-radius: 8px; /* 圆角边框 */
    height: 770px; /* 固定高度 */
    margin: 16px 0; /* 上下边距 */
    background-color: #fff; /* 背景颜色 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 添加阴影 */
    padding: 16px; /* 内边距 */
  }

  .button-container {
  margin: 10px;  /* 添加外边距 */
}

.action-button {
  margin: 5px;  /* 添加按钮间距 */
}


.button-container {
  margin: 10px;
  display: flex;
  justify-content: center;
}

.unique-dialog-style {
  .el-dialog__header {
    background-color: #e0f7fa; /* 更柔和的背景色 */
    color: #00796b; /* 标题颜色 */
  }

  .el-input__inner {
    border: 1px solid #80deea; /* 调整输入框边框颜色 */
    border-radius: 8px; /* 圆角 */
  }

  .unique-footer-style {
    padding: 15px; /* 调整底部按钮的间距 */
    text-align: right; /* 右对齐 *{
    background-color: #ffffff; /* 自定义取消按钮的颜色 */
    color: #00796b; /* 自定义文字颜色 */
    border: 1px solid #80deea; /* 添加边框 */
  }

  .unique-confirm-button {
    margin-left: 10px; /* 确认按钮左侧增加间距 */
    background-color: #00796b;
    color: #ffffff; /* 确认按钮文字颜色 */
    border-radius: 4px; /* 圆角 */
  }
}

.input-container {
  flex-grow: 1; /* 使输入框容器扩展以填充可用空间 */
  display: flex;
}

.resizable-input {
  flex-grow: 1; /* 使输入框扩展以填充容器 */
  min-height: 100px; /* 设置最小高度以确保有足够的空间 */
  resize: vertical; /* 允许用户仅在垂直方向上调整大小 */
}

.custom-button {
    margin-top: 3px !important;
    height: 36px; /* 统一按钮高度 */
    padding: 0 20px; /* 内边距 */
    font-size: 14px; /* 字体大小 */
    color: #333; /* 文字颜色 */
    background-color: #f0f0f0; /* 背景颜色 */
    border: 1px solid #ccc; /* 边框颜色 */
    border-radius: 4px; /* 圆角 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影 */
    cursor: pointer; /* 鼠标悬停时显示指针 */
    transition: all 0.3s ease; /* 平滑过渡效果 */
    margin-bottom: 2px !important;
  }

  .custom-button:hover {
    background-color: #e0e0e0; /* 悬停时背景颜色变化 */
    border-color: #999; /* 悬停时边框颜色变化 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 悬停时阴影变化 */
  }

  .custom-button:active {
    background-color: #d0d0d0; /* 按下时背景颜色变化 */
    border-color: #888; /* 按下时边框颜色变化 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* 按下时阴影变化 */
  }
</style>

